diff --git a/.dockerignore b/.dockerignore index 1269488f7fb1f4b56a8c0e5eb48cecbfadfa9219..c9608af208c57cd48e371598e6e2435cf30a86a0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ data +.venv diff --git a/.env-example b/.env-example index 23b50f33e354d83da2ca87be0ff6357ad1a281e7..759240d75c4155592f650eab9f4449205a4e15df 100644 --- a/.env-example +++ b/.env-example @@ -22,7 +22,7 @@ FORCE_IMPORT=false # custom server for region download (geofabrik if unset) - update tiles/config.json if set! REGIONS_URL= # region to import. By default the whole country (France) -REGIONS=france/basse-normandie-latest +REGIONS=france/champagne-ardenne-latest INITIAL_MAX_ZOOM=4 # max zoom to cache when application is (re)starting diff --git a/.gitignore b/.gitignore index 1d0d1ae8aba7a781eb87c6c44f8f6d4401ba055d..414093089475bfd3a70e4bcfeae1ad7cec96ffb4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ __pycache__/ /data/ front/node_modules -front/package-lock.json .env .idea/* !.idea/runConfigurations +pyvenv.cfg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40990fa9ce5a6e735f63b00bd5b95fcab19b7d07..ba85331c17567dd40a8e6bd910d65bf5e6e162ad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,9 @@ repos: entry: ruff language: system types: [python] - args: [check, ., --fix] + args: + - check + - --fix - repo: local hooks: - id: mypy diff --git a/back/.gitignore b/back/.gitignore index d9afa64b92e02cddb3c4b00073322505b85abfad..7b59c93fde06b59feb7b980ea261da8a1d6aa0db 100644 --- a/back/.gitignore +++ b/back/.gitignore @@ -74,7 +74,6 @@ target/ .ipynb_checkpoints # pyenv -.python-version # celery beat schedule file celerybeat-schedule diff --git a/back/.python-version b/back/.python-version new file mode 100644 index 0000000000000000000000000000000000000000..24ee5b1be9961e38a503c8e764b7385dbb6ba124 --- /dev/null +++ b/back/.python-version @@ -0,0 +1 @@ +3.13 diff --git a/back/batimap/db.py b/back/batimap/db.py index 818eee622b150e9cf3b58e89cb49013f7acf5377..9f0ee99f4221c225e3b0e4349b8ac0a745ea9137 100644 --- a/back/batimap/db.py +++ b/back/batimap/db.py @@ -36,7 +36,7 @@ class Building(Base): # type: ignore source_date = Column(String) building = Column(String) tags = Column(HSTORE) - geometry = Column(Geometry(geometry_type="POLYGON", management=True)) + geometry = Column(Geometry(geometry_type="POLYGON")) class Boundary(Base): # type: ignore @@ -48,7 +48,7 @@ class Boundary(Base): # type: ignore boundary = Column(String) admin_level = Column(Integer) insee = Column(String) - geometry = Column(Geometry(geometry_type="POLYGON", management=True)) + geometry = Column(Geometry(geometry_type="POLYGON")) class City(Base): # type: ignore diff --git a/back/entrypoint.sh b/back/entrypoint.sh index e6b8a25cc0a9dc1f3b938aeba0611e185964676e..f956e5b82ceb996a19db5db102ce5126d5aafee4 100755 --- a/back/entrypoint.sh +++ b/back/entrypoint.sh @@ -37,7 +37,7 @@ if [ $# = 0 ]; then # start the back echo "Batimap is ready for use!" - gunicorn --bind ':5000' --timeout $GUNICORN_TIMEOUT_VALUE --workers $GUNICORN_WORKERS batimap.wsgi:app + gunicorn --bind ':8081' --timeout $GUNICORN_TIMEOUT_VALUE --workers $GUNICORN_WORKERS batimap.wsgi:app else exec "$@" fi diff --git a/back/tests/docker-compose.yml b/back/tests/docker-compose.yml index 3eb3ba88f04ad6c7717a374995417059ceb436cd..a9dd5dda4d6ce6c59a95ca397f9fbcebe49fece9 100644 --- a/back/tests/docker-compose.yml +++ b/back/tests/docker-compose.yml @@ -1,6 +1,7 @@ services: postgis: image: registry.gitlab.com/bagage/batimap/postgis + # build: ../../postgis command: ["postgres", "-c", "log_statement=all"] ports: - "15432:5432" @@ -11,6 +12,6 @@ services: - POSTGRES_HOST=postgis - POSTGRES_PORT=5432 redis: - image: redis:5-alpine + image: redis:6-alpine ports: - "16379:6379" diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 488729b09c09dd40938be740ffd850f7cbe76898..92d7c6e9b17a3722a27e010498341a15e1f15069 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -31,20 +31,22 @@ services: build: back command: celery -A batimap.app_celery:app worker --loglevel=info --queues celery --concurrency 1 volumes: - - ./back/:/code + - ./back/batimap:/code/batimap celery-slow: build: back command: celery -A batimap.app_celery:app worker --loglevel=info --queues celery_slow --concurrency 1 volumes: - - ./back/:/code + - ./back/batimap:/code/batimap back: build: back ports: - - "5000:5000" + - "8081:8081" volumes: - - ./back/:/code + - ./back/batimap:/code/ + - ./back/pyproject.toml:/code/ + - ./back/uv.lock:/code/ - ./back/app-docker.conf/:/code/app.conf:ro front: @@ -79,6 +81,6 @@ services: command: celery -A batimap.app_celery:app flower --port=5566 volumes: - ./back/app-docker.conf/:/code/batimap/app.conf:ro - - ./back/:/code + - ./back/batimap:/code/batimap depends_on: - postgis diff --git a/docker-compose.yml b/docker-compose.yml index 6967e7637f17ce268fa30cf9c4a9cdf37b4a78ed..98f8f467d9a12f6431e1f6589da4f25028db965e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,3 +82,4 @@ services: - tiles - back + diff --git a/front/Dockerfile.ci b/front/Dockerfile.ci index 18ec1f47dd0e9f3af2f8d76eb08282ef08edbbb2..fc09d85060ab64c449df6aa2b92fe0f49bda3236 100644 --- a/front/Dockerfile.ci +++ b/front/Dockerfile.ci @@ -1,5 +1,5 @@ FROM node:24 -RUN apt-get update && apt-get install -yy chromium --no-install-recommends && apt-get clean +RUN npx -y @puppeteer/browsers install chrome@stable -ENV CHROME_BIN=/usr/bin/chromium +ENV CHROME_BIN=/chrome/linux_arm-138.0.7204.157/chrome-linux64/chrome diff --git a/front/prod/nginx.conf b/front/prod/nginx.conf index 0e39f67e9983864e5cbb655dd897776d87e0b073..94055538dfb5409260352610392eb95b17f7cfbf 100644 --- a/front/prod/nginx.conf +++ b/front/prod/nginx.conf @@ -13,7 +13,7 @@ server { } location /back/ { - proxy_pass http://localhost:5000/; + proxy_pass http://localhost:8081/; } location /tiles/ { diff --git a/front/src/app/services/app-config.service.mock.ts b/front/src/app/services/app-config.service.mock.ts index 282b7a26bd502166e4ff0795d8114d0f243a38a5..e22cbfd4a940fb18621a708db05162e03ab0808e 100644 --- a/front/src/app/services/app-config.service.mock.ts +++ b/front/src/app/services/app-config.service.mock.ts @@ -1,7 +1,7 @@ export class MockAppConfigService { getConfig(): any { return { - backServerUrl: 'http://localhost:5000/', + backServerUrl: 'http://localhost:8081/', tilesServerUrl: 'http://localhost:9999/maps/batimap/{z}/{x}/{y}.vector.pbf', }; } diff --git a/front/src/assets/data/appConfig.json b/front/src/assets/data/appConfig.json index a375612ccb8586d86c9627db824497c68aada847..842b4cdbf3094c57828e1a8dc86cc762bb1fa3db 100644 --- a/front/src/assets/data/appConfig.json +++ b/front/src/assets/data/appConfig.json @@ -1,4 +1,4 @@ { - "backServerUrl": "http://localhost:5000/", + "backServerUrl": "http://localhost:8081/", "tilesServerUrl": "http://localhost:9999/maps/batimap/{z}/{x}/{y}.vector.pbf" } diff --git a/imposm-watcher/.python-version b/imposm-watcher/.python-version new file mode 100644 index 0000000000000000000000000000000000000000..24ee5b1be9961e38a503c8e764b7385dbb6ba124 --- /dev/null +++ b/imposm-watcher/.python-version @@ -0,0 +1 @@ +3.13 diff --git a/imposm-watcher/Dockerfile b/imposm-watcher/Dockerfile index bb669016ad91f1deaff9c483d3f73db6894d6087..c6ef9481dbd0f0dea88fca10b5d7d858d0655d7b 100644 --- a/imposm-watcher/Dockerfile +++ b/imposm-watcher/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-alpine AS base +FROM python:3.13-alpine AS base FROM base AS builder @@ -6,10 +6,11 @@ RUN mkdir /src WORKDIR /src RUN apk --update add build-base +RUN pip install uv==0.8.0 -COPY Pipfile* /src/ +COPY pyproject.toml uv.lock /src/ -RUN pip install pipenv==2021.5.29 && pipenv lock -r > requirements.txt && pip install -r requirements.txt +RUN uv pip compile pyproject.toml -o requirements.txt && pip install -r requirements.txt FROM base diff --git a/imposm-watcher/Pipfile b/imposm-watcher/Pipfile deleted file mode 100644 index a5c25de2c6ec4cacb8446721b55a233dd51e34d9..0000000000000000000000000000000000000000 --- a/imposm-watcher/Pipfile +++ /dev/null @@ -1,13 +0,0 @@ -[[source]] -name = "pypi" -url = "https://pypi.org/simple" -verify_ssl = true - -[dev-packages] - -[packages] -requests = "*" -watchdog = "*" - -[requires] -python_version = "3.10" diff --git a/imposm-watcher/Pipfile.lock b/imposm-watcher/Pipfile.lock deleted file mode 100644 index f808cb2fc9ee95228e72fb75260881a4563f5cce..0000000000000000000000000000000000000000 --- a/imposm-watcher/Pipfile.lock +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "07fb0003583c442d6fe6b7d993fac3fb98221b84cbf30536c3c1258c9a62a2c0" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3.10" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "certifi": { - "hashes": [ - "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872", - "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569" - ], - "version": "==2021.10.8" - }, - "charset-normalizer": { - "hashes": [ - "sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0", - "sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b" - ], - "markers": "python_version >= '3'", - "version": "==2.0.7" - }, - "idna": { - "hashes": [ - "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", - "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" - ], - "markers": "python_version >= '3'", - "version": "==3.3" - }, - "requests": { - "hashes": [ - "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24", - "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" - ], - "index": "pypi", - "version": "==2.26.0" - }, - "urllib3": { - "hashes": [ - "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece", - "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", - "version": "==1.26.7" - }, - "watchdog": { - "hashes": [ - "sha256:25fb5240b195d17de949588628fdf93032ebf163524ef08933db0ea1f99bd685", - "sha256:3386b367e950a11b0568062b70cc026c6f645428a698d33d39e013aaeda4cc04", - "sha256:3becdb380d8916c873ad512f1701f8a92ce79ec6978ffde92919fd18d41da7fb", - "sha256:4ae38bf8ba6f39d5b83f78661273216e7db5b00f08be7592062cb1fc8b8ba542", - "sha256:8047da932432aa32c515ec1447ea79ce578d0559362ca3605f8e9568f844e3c6", - "sha256:8f1c00aa35f504197561060ca4c21d3cc079ba29cf6dd2fe61024c70160c990b", - "sha256:922a69fa533cb0c793b483becaaa0845f655151e7256ec73630a1b2e9ebcb660", - "sha256:9693f35162dc6208d10b10ddf0458cc09ad70c30ba689d9206e02cd836ce28a3", - "sha256:a0f1c7edf116a12f7245be06120b1852275f9506a7d90227648b250755a03923", - "sha256:a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7", - "sha256:aba5c812f8ee8a3ff3be51887ca2d55fb8e268439ed44110d3846e4229eb0e8b", - "sha256:ad6f1796e37db2223d2a3f302f586f74c72c630b48a9872c1e7ae8e92e0ab669", - "sha256:ae67501c95606072aafa865b6ed47343ac6484472a2f95490ba151f6347acfc2", - "sha256:b2fcf9402fde2672545b139694284dc3b665fd1be660d73eca6805197ef776a3", - "sha256:b52b88021b9541a60531142b0a451baca08d28b74a723d0c99b13c8c8d48d604", - "sha256:b7d336912853d7b77f9b2c24eeed6a5065d0a0cc0d3b6a5a45ad6d1d05fb8cd8", - "sha256:bd9ba4f332cf57b2c1f698be0728c020399ef3040577cde2939f2e045b39c1e5", - "sha256:be9be735f827820a06340dff2ddea1fb7234561fa5e6300a62fe7f54d40546a0", - "sha256:cca7741c0fcc765568350cb139e92b7f9f3c9a08c4f32591d18ab0a6ac9e71b6", - "sha256:d0d19fb2441947b58fbf91336638c2b9f4cc98e05e1045404d7a4cb7cddc7a65", - "sha256:e02794ac791662a5eafc6ffeaf9bcc149035a0e48eb0a9d40a8feb4622605a3d", - "sha256:e0f30db709c939cabf64a6dc5babb276e6d823fd84464ab916f9b9ba5623ca15", - "sha256:e92c2d33858c8f560671b448205a268096e17870dcf60a9bb3ac7bfbafb7f5f9" - ], - "index": "pypi", - "version": "==2.1.6" - } - }, - "develop": {} -} diff --git a/imposm-watcher/app.conf b/imposm-watcher/app.conf index 2997107267f094813d0a5b607d937f61089cddb0..a3fa3b431730317caa1e9a069ab508b7743ed59b 100644 --- a/imposm-watcher/app.conf +++ b/imposm-watcher/app.conf @@ -1,3 +1,3 @@ [DEFAULT] -BACK_URL=http://back:5000 +BACK_URL=http://back:8081 VERBOSITY=INFO diff --git a/imposm-watcher/pyproject.toml b/imposm-watcher/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..1e046252a1cd8a67bf0d2bd17c93f24c8e54436f --- /dev/null +++ b/imposm-watcher/pyproject.toml @@ -0,0 +1,10 @@ +[project] +name = "imposm-watcher" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.13" +dependencies = [ + "requests>=2.32.4", + "watchdog>=6.0.0", +] diff --git a/imposm-watcher/uv.lock b/imposm-watcher/uv.lock new file mode 100644 index 0000000000000000000000000000000000000000..f72bd09efad2192841500a4ea77ca9e7fda4b56f --- /dev/null +++ b/imposm-watcher/uv.lock @@ -0,0 +1,102 @@ +version = 1 +requires-python = ">=3.13" + +[[package]] +name = "certifi" +version = "2025.7.14" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b3/76/52c535bcebe74590f296d6c77c86dabf761c41980e1347a2422e4aa2ae41/certifi-2025.7.14.tar.gz", hash = "sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995", size = 163981 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/52/34c6cf5bb9285074dc3531c437b3919e825d976fde097a7a73f79e726d03/certifi-2025.7.14-py3-none-any.whl", hash = "sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2", size = 162722 }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63", size = 126367 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ea/12/a93df3366ed32db1d907d7593a94f1fe6293903e3e92967bebd6950ed12c/charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0", size = 199622 }, + { url = "https://files.pythonhosted.org/packages/04/93/bf204e6f344c39d9937d3c13c8cd5bbfc266472e51fc8c07cb7f64fcd2de/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf", size = 143435 }, + { url = "https://files.pythonhosted.org/packages/22/2a/ea8a2095b0bafa6c5b5a55ffdc2f924455233ee7b91c69b7edfcc9e02284/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e", size = 153653 }, + { url = "https://files.pythonhosted.org/packages/b6/57/1b090ff183d13cef485dfbe272e2fe57622a76694061353c59da52c9a659/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1", size = 146231 }, + { url = "https://files.pythonhosted.org/packages/e2/28/ffc026b26f441fc67bd21ab7f03b313ab3fe46714a14b516f931abe1a2d8/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c", size = 148243 }, + { url = "https://files.pythonhosted.org/packages/c0/0f/9abe9bd191629c33e69e47c6ef45ef99773320e9ad8e9cb08b8ab4a8d4cb/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691", size = 150442 }, + { url = "https://files.pythonhosted.org/packages/67/7c/a123bbcedca91d5916c056407f89a7f5e8fdfce12ba825d7d6b9954a1a3c/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0", size = 145147 }, + { url = "https://files.pythonhosted.org/packages/ec/fe/1ac556fa4899d967b83e9893788e86b6af4d83e4726511eaaad035e36595/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b", size = 153057 }, + { url = "https://files.pythonhosted.org/packages/2b/ff/acfc0b0a70b19e3e54febdd5301a98b72fa07635e56f24f60502e954c461/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff", size = 156454 }, + { url = "https://files.pythonhosted.org/packages/92/08/95b458ce9c740d0645feb0e96cea1f5ec946ea9c580a94adfe0b617f3573/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b", size = 154174 }, + { url = "https://files.pythonhosted.org/packages/78/be/8392efc43487ac051eee6c36d5fbd63032d78f7728cb37aebcc98191f1ff/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148", size = 149166 }, + { url = "https://files.pythonhosted.org/packages/44/96/392abd49b094d30b91d9fbda6a69519e95802250b777841cf3bda8fe136c/charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7", size = 98064 }, + { url = "https://files.pythonhosted.org/packages/e9/b0/0200da600134e001d91851ddc797809e2fe0ea72de90e09bec5a2fbdaccb/charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980", size = 105641 }, + { url = "https://files.pythonhosted.org/packages/20/94/c5790835a017658cbfabd07f3bfb549140c3ac458cfc196323996b10095a/charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0", size = 52626 }, +] + +[[package]] +name = "idna" +version = "3.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442 }, +] + +[[package]] +name = "imposm-watcher" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "requests" }, + { name = "watchdog" }, +] + +[package.metadata] +requires-dist = [ + { name = "requests", specifier = ">=2.32.4" }, + { name = "watchdog", specifier = ">=6.0.0" }, +] + +[[package]] +name = "requests" +version = "2.32.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz", hash = "sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422", size = 135258 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/e4/56027c4a6b4ae70ca9de302488c5ca95ad4a39e190093d6c1a8ace08341b/requests-2.32.4-py3-none-any.whl", hash = "sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c", size = 64847 }, +] + +[[package]] +name = "urllib3" +version = "2.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", size = 393185 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc", size = 129795 }, +] + +[[package]] +name = "watchdog" +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480 }, + { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451 }, + { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057 }, + { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079 }, + { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076 }, + { url = "https://files.pythonhosted.org/packages/ab/cc/da8422b300e13cb187d2203f20b9253e91058aaf7db65b74142013478e66/watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f", size = 79077 }, + { url = "https://files.pythonhosted.org/packages/2c/3b/b8964e04ae1a025c44ba8e4291f86e97fac443bca31de8bd98d3263d2fcf/watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/62/ae/a696eb424bedff7407801c257d4b1afda455fe40821a2be430e173660e81/watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c", size = 79077 }, + { url = "https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/07/f6/d0e5b343768e8bcb4cda79f0f2f55051bf26177ecd5651f84c07567461cf/watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a", size = 79065 }, + { url = "https://files.pythonhosted.org/packages/db/d9/c495884c6e548fce18a8f40568ff120bc3a4b7b99813081c8ac0c936fa64/watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680", size = 79070 }, + { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067 }, +] diff --git a/imposm/Dockerfile b/imposm/Dockerfile index 004c40a8f6fdf9e9fa6256d964e9143f1a738b6f..94550dbc1d392d48183a37c73f4e4c2271b45f83 100644 --- a/imposm/Dockerfile +++ b/imposm/Dockerfile @@ -1,8 +1,8 @@ -FROM debian:bullseye-slim +FROM --platform=linux/amd64 debian:bullseye-slim -RUN apt update && apt install --no-install-recommends -y axel wget postgresql-client ca-certificates && apt clean +RUN apt update && apt install --no-install-recommends -y axel wget postgresql-client ca-certificates libc6 && apt clean -ARG IMPOSM3_VERSION=0.11.1 +ARG IMPOSM3_VERSION=0.14.2 ARG IMPOSM3_TARFILE="imposm-${IMPOSM3_VERSION}-linux-x86-64.tar.gz" ARG IMPOSM3_BASE_URL="https://github.com/omniscale/imposm3/releases/download/v${IMPOSM3_VERSION}/${IMPOSM3_TARFILE}" diff --git a/imposm/config.json b/imposm/config.json index 01364791367b32cfe5030ffafeb33d010242b14d..c47ac2a5ec71e4aa00dafca435181f36527c80e2 100644 --- a/imposm/config.json +++ b/imposm/config.json @@ -3,8 +3,6 @@ "diffdir": "/data/diff", "expiretiles_dir": "/data/updated-tiles", "expiretiles_zoom": 13, - // "replication_interval": "24h", - // "replication_url": "http://download.geofabrik.de/europe/france-updates/", "replication_interval": "1m", "replication_url": "https://download.openstreetmap.fr/replication/merge/france_metro_dom_com_nc/minute/", "srid": 4326 diff --git a/imposm/entrypoint.sh b/imposm/entrypoint.sh index f403821be484113f3594e972a3ccb6e3108b4a1a..1e0706edbe718781d8b0c3eb242f4d6bc4623d62 100755 --- a/imposm/entrypoint.sh +++ b/imposm/entrypoint.sh @@ -100,4 +100,6 @@ if [ "$DO_IMPORT" = "true" ]; then echo "Imports done!" fi +echo running? imposm run -config /config/config.json -mapping /config/mapping.json -connection $connection_param +echo ok diff --git a/tiles-cleaner/Dockerfile b/tiles-cleaner/Dockerfile index 8e3dbc44e68bc030972b41e520c99d9e10c9ca3c..6c77b09458283bbcb1ab2910fa65cc2fa4472916 100644 --- a/tiles-cleaner/Dockerfile +++ b/tiles-cleaner/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:sid-slim +FROM --platform=linux/amd64 debian:sid-slim RUN apt update && \ apt install -y unzip postgresql-client wget jq curl adduser && \ diff --git a/tiles-cleaner/config.toml b/tiles-cleaner/config.toml index a6ac1248bd8a2b17695b244e2babfd000f23a46b..f022ee0d3238049ae86c948c16f2b5a8992be4e8 100644 --- a/tiles-cleaner/config.toml +++ b/tiles-cleaner/config.toml @@ -10,11 +10,7 @@ basepath = "/data/cache" [[providers]] name = "cadastre" # provider name is referenced from map layers type = "postgis" # the type of data provider. currently only supports postgis -host = "postgis" # postgis database host -port = 5432 # postgis database port -database = "gis" # postgis database name -user = "docker" # postgis database user -password = "batimap" # postgis database password +uri = "postgres://docker:batimap@postgis:5432/gis?sslmode=prefer" # PostGIS connection string (required) srid = 4326 # The default srid for this provider. If not provided it will be WebMercator (3857) [[providers.layers]] diff --git a/tiles/Dockerfile b/tiles/Dockerfile index f00d7b61bc38db9ce30594edbef3369853a7f7ae..ca2cdc8f0f0a442da4bd05ecca910d5b0cc129bd 100644 --- a/tiles/Dockerfile +++ b/tiles/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:sid-slim +FROM --platform=linux/amd64 debian:sid-slim RUN apt update && \ apt install -y unzip postgresql-client wget jq curl adduser && \ diff --git a/tiles/config.toml b/tiles/config.toml index a6ac1248bd8a2b17695b244e2babfd000f23a46b..f022ee0d3238049ae86c948c16f2b5a8992be4e8 100644 --- a/tiles/config.toml +++ b/tiles/config.toml @@ -10,11 +10,7 @@ basepath = "/data/cache" [[providers]] name = "cadastre" # provider name is referenced from map layers type = "postgis" # the type of data provider. currently only supports postgis -host = "postgis" # postgis database host -port = 5432 # postgis database port -database = "gis" # postgis database name -user = "docker" # postgis database user -password = "batimap" # postgis database password +uri = "postgres://docker:batimap@postgis:5432/gis?sslmode=prefer" # PostGIS connection string (required) srid = 4326 # The default srid for this provider. If not provided it will be WebMercator (3857) [[providers.layers]]