|
1 | 1 | # OSM-Seed taginfo |
2 | 2 |
|
3 | | -We build a docker container for taginfo software, the container will start the web service and also process required files to create databases. |
| 3 | +Docker container for taginfo that runs the web service and processes PBF files to create databases. |
4 | 4 |
|
5 | 5 | ## Environment Variables |
6 | 6 |
|
7 | | -All environment variables are located at [`.env.taginfo.example`](./../../envs/.env.taginfo.example), make a copy and name it as `.env.tagninfo` to use in osm-seed. |
| 7 | +Copy [`.env.taginfo.example`](./../../envs/.env.taginfo.example) to `.env.taginfo` and configure: |
8 | 8 |
|
9 | | -- `URL_PLANET_FILE_STATE`: Url to the state file, that contains the URL for the latest planet PBF file. e.g [`state.txt`](https://planet.openhistoricalmap.org.s3.amazonaws.com/planet/state.txt), This is no required in case you set the `URL_PLANET_FILE` env var |
| 9 | +### Planet Files |
| 10 | +- `URL_PLANET_FILE_STATE`: URL to state file with latest planet PBF URL (optional if `URL_PLANET_FILE` is set) |
| 11 | +- `URL_HISTORY_PLANET_FILE_STATE`: URL to state file with latest history PBF URL (optional if `URL_HISTORY_PLANET_FILE` is set) |
| 12 | +- `URL_PLANET_FILE`: Direct URL to planet PBF file |
| 13 | +- `URL_HISTORY_PLANET_FILE`: Direct URL to history PBF file |
10 | 14 |
|
11 | | -- `URL_HISTORY_PLANET_FILE_STATE`: Url to the full history state file, that contains the URL for the latest full history planet PBF file. e.g [`state.txt`](https://planet.openhistoricalmap.org.s3.amazonaws.com/planet/full-history/state.txt), This is no required in case you set the `URL_HISTORY_PLANET_FILE` env var |
| 15 | +### Database Configuration |
| 16 | +- `TAGINFO_DB_BASE_URL`: Base URL to download SQLite database files. Downloads: projects-cache.db, selection.db, taginfo-chronology.db, taginfo-db.db, taginfo-history.db, taginfo-languages.db, taginfo-master.db, taginfo-projects.db, taginfo-wiki.db, taginfo-wikidata.db |
| 17 | + - Example: `https://planet.openhistoricalmap.org.s3.amazonaws.com/taginfo` |
12 | 18 |
|
13 | | -- `URL_PLANET_FILE`: URL for the latest planet PBF file. |
14 | | -- `URL_HISTORY_PLANET_FILE`: URL for the latest full history planet PBF file. |
15 | | -- `TIME_UPDATE_INTERVAL` Interval time to update the databases, e.g: `50m` = every 50 minutes, `20h` = every 20 hours , `5d` = every 5 days |
| 19 | +- `DOWNLOAD_DB`: Which databases to download (e.g., `languages wiki` or `languages wiki projects chronology`) |
16 | 20 |
|
17 | | -The following env vars are required in the instance to update the values at: https://github.com/taginfo/taginfo/blob/master/taginfo-config-example.json |
| 21 | +- `CREATE_DB`: Which databases to create from PBF files (e.g., `db projects` or `db projects chronology`) |
| 22 | + - `db` requires `URL_PLANET_FILE` or `URL_PLANET_FILE_STATE` |
| 23 | + - `projects` requires `TAGINFO_PROJECT_REPO` |
| 24 | + - `chronology` requires `URL_PLANET_FILE` or `URL_HISTORY_PLANET_FILE` |
18 | 25 |
|
19 | | -- `OVERWRITE_CONFIG_URL`: config file with the values to update |
| 26 | +### Other |
| 27 | +- `TAGINFO_PROJECT_REPO`: Repository URL for taginfo projects (default: https://github.com/taginfo/taginfo-projects.git) |
| 28 | +- `OVERWRITE_CONFIG_URL`: URL to custom taginfo config JSON file |
| 29 | +- `INTERVAL_DOWNLOAD_DATA`: Interval to sync databases (e.g., `3600` for 1 hour, `7d` for 7 days) |
20 | 30 |
|
21 | | -- `DOWNLOAD_DB`: Taginfo instances need 7 Sqlite databases to start up the web service, all of them can be downloaded from https://taginfo.openstreetmap.org/download. Or if you can download only some of them you can pass herec. e.g DOWNLOAD_DB=`languages wiki`, or DOWNLOAD_DB=`languages wiki projects chronology`. |
22 | | - |
23 | | -- `CREATE_DB`: If you want process you of data using the PBF files, you can pass the values. eg. CREATE_DB=`db projects` or CREATE_DB=`db projects chronology`. |
24 | | - Note: |
25 | | - - Value `db` require to pass `URL_PLANET_FILE` or `URL_PLANET_FILE_STATE` |
26 | | - - Value `projects` require to pass `TAGINFO_PROJECT_REPO` |
27 | | - - Value `chronology` require to pass `URL_PLANET_FILE` or `URL_HISTORY_PLANET_FILE` |
28 | | - |
29 | | -#### Running taginfo container |
| 31 | +## Running |
30 | 32 |
|
31 | 33 | ```sh |
32 | | - # Docker compose |
33 | | - docker-compose run taginfo |
34 | | - |
35 | | - # Docker |
36 | | - docker run \ |
37 | | - --env-file ./envs/.env.taginfo \ |
38 | | - -v ${PWD}/data/taginfo-data:/apps/data/ \ |
39 | | - --network osm-seed_default \ |
40 | | - -it osmseed-taginfo:v1 |
41 | | -``` |
| 34 | +# Docker compose |
| 35 | +docker-compose run taginfo |
| 36 | + |
| 37 | +# Docker |
| 38 | +docker run \ |
| 39 | + --env-file ./envs/.env.taginfo \ |
| 40 | + -v ${PWD}/data/taginfo-data:/usr/src/app/data \ |
| 41 | + --network osm-seed_default \ |
| 42 | + -it osmseed-taginfo:v1 |
| 43 | +``` |
0 commit comments