Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ jobs:
request_pty: true
script_stop: true
script: |
become translatetagger git -C '$HOME/www/python/src' fetch origin
become translatetagger git -C '$HOME/www/python/src' reset --hard origin/main
become translatetagger git -C '$HOME/www/python/src' pull origin main
become translatetagger webservice python3.11 shell -- webservice-python-bootstrap
become translatetagger webservice python3.11 restart
become translatetagger webservice python3.11 status
become translatetagger toolforge build clean -y
become translatetagger toolforge build start https://github.com/ftosoni/TranslateTagger
become translatetagger toolforge webservice buildservice restart || become translatetagger toolforge webservice buildservice start --mount=all
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn app:app --bind 0.0.0.0:8000 --workers=2 --timeout 60 --access-logfile -
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,44 @@ This is a text with an [[internal link]] and an [https://openstreetmap.org exter
* Links Handling: The tool wraps internal links with <tvar> tags for better translation support, ensuring they are localized using Special:MyLanguage.
* Template Removal: Templates and other non-translatable elements will be automatically cleaned up for a simpler translation process.


## Deployment (Toolforge)

Follow these steps to deploy the application on Wikimedia Toolforge using the build service.

> [!NOTE]
> The examples below use `translatetagger` as the project name. Replace this with your own Toolforge credentials where applicable.

### Deploy

1. Log into Toolforge:
```bash
ssh <username>@login.toolforge.org
```

2. Switch to the `translatetagger` project:
```bash
become translatetagger
```

3. Stop and clean the existing build:
```bash
toolforge webservice buildservice stop --mount=all
toolforge build clean -y
```

4. Start the build from the repository:
```bash
toolforge build start https://github.com/ftosoni/TranslateTagger
```

5. Start the webservice:
```bash
toolforge webservice buildservice start --mount=all
```

6. Monitor logs:
```bash
toolforge webservice logs -f
```

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ typing_extensions==4.12.2
urllib3==2.3.0
Werkzeug==3.0.4
mwparserfromhell==0.6.6
gunicorn==23.0.0

Loading