-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Installing OpenStreetMap Welcome Tool | ||
## Installing OpenStreetMap Welcome Tool | ||
|
||
## Requirements | ||
### Requirements | ||
|
||
- Install dependencies: | ||
|
||
|
@@ -22,38 +22,38 @@ | |
|
||
- Create `OSMCHA_API_KEY` in your environment with your [OSMCha](https://osmcha.org/) API key | ||
|
||
## Run locally | ||
### Run locally | ||
|
||
### Symfony Local Web Server | ||
#### Symfony Local Web Server | ||
|
||
- Install [Symfony CLI](https://symfony.com/download) | ||
- Run `symfony server:start` | ||
- Browse the given URL | ||
|
||
Check [Symfony local server documentation](https://symfony.com/doc/current/setup/symfony_server.html) for more information. | ||
|
||
### Docker | ||
#### Docker | ||
|
||
```cmd | ||
docker build . --tag osm-welcome-tool | ||
docker run --detach --publish 80:80 --env-file .env.local osm-welcome-tool | ||
``` | ||
|
||
## Deploy | ||
### Deploy | ||
|
||
Check [Symfony deployment documentation](https://symfony.com/doc/current/deployment.html). | ||
|
||
### Using Deployer | ||
#### Using Deployer | ||
|
||
```cmd | ||
vendor/bin/dep deploy --branch=2.x welcome.osm.be | ||
npm run build | ||
rsync -e ssh -avz public/build/ [email protected]:/var/www/osm-welcome-tool/current/public/build/ | ||
``` | ||
|
||
## Automated update | ||
### Automated update | ||
|
||
### Cron Job (SQLite) | ||
#### Cron Job (SQLite) | ||
|
||
Create an `osm-welcome-tool` file in `/etc/cron.daily` folder (for a daily update): | ||
|
||
|
@@ -74,3 +74,25 @@ cp "/var/www/osm-welcome-tool/current/var/data.db" "$BACKUP_DIRECTORY/$BACKUP_FI | |
cd "/var/www/osm-welcome-tool/current/" | ||
php bin/console welcome:update | ||
``` | ||
|
||
## Translating OpenStreetMap Welcome Tool | ||
|
||
1. Update XLIFF files for English | ||
|
||
```cmd | ||
php bin/console translation:extract --force en | ||
``` | ||
1. Upload XLIFF files for English to Crowdin | ||
```cmd | ||
php bin/console translation:push --force --locales en | ||
``` | ||
1. Update translations in [Crowdin](https://crowdin.com/project/osm-welcome-tool) | ||
1. Download XLIFF files from Crowdin | ||
```cmd | ||
php bin/console translation:pull --force | ||
``` |