This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update to prod config using cgimap and background worker services
- Loading branch information
1 parent
166e4ac
commit cee4425
Showing
3 changed files
with
153 additions
and
5 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ networks: | |
volumes: | ||
osm-tmp: | ||
osm-storage: | ||
osm-config: | ||
osm-db-data: | ||
certs: | ||
certbot_data: | ||
|
@@ -21,6 +22,8 @@ services: | |
depends_on: | ||
osm: | ||
condition: service_started | ||
osm-cgi: | ||
condition: service_started | ||
ports: | ||
- ${OSM_DEV_PORT:-4433}:80 | ||
networks: | ||
|
@@ -38,6 +41,8 @@ services: | |
depends_on: | ||
osm: | ||
condition: service_started | ||
osm-cgi: | ||
condition: service_started | ||
certbot: | ||
condition: service_completed_successfully | ||
volumes: | ||
|
@@ -53,29 +58,87 @@ services: | |
restart: "unless-stopped" | ||
|
||
osm: | ||
image: ghcr.io/hotosm/osm-sandbox:2024.4.30 | ||
image: "ghcr.io/hotosm/osm-sandbox:2024.4.30" | ||
build: . | ||
depends_on: | ||
osm-db: | ||
condition: service_healthy | ||
environment: | ||
PROTOCOL: http${DOMAIN:+s} | ||
# NOTE for development this must be 127.0.0.1 due to | ||
# OSM oauth config restrictions | ||
DOMAIN: ${DOMAIN:-127.0.0.1:4433} | ||
ADMIN_EMAIL: ${ADMIN_EMAIL:[email protected]} | ||
ADMIN_PASS: ${ADMIN_PASS:-Password1234} | ||
ID_EDITOR_REDIRECT_URI: http${DOMAIN:+s}://${DOMAIN:-127.0.0.1:4433} | ||
volumes: | ||
# Mount a tmp directory that will persist between runs | ||
- osm-tmp:/app/tmp | ||
# Mount a storage directory that will persist between runs | ||
- osm-storage:/app/storage | ||
# Mount config between containers | ||
- osm-config:/app/config | ||
# Mount local setting overrides | ||
# - ./settings.local.yml:/app/config/settings.local.yml:ro | ||
tmpfs: | ||
/tmp/pids/ | ||
networks: | ||
- osm-net | ||
restart: unless-stopped | ||
healthcheck: | ||
test: timeout 5s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1 | ||
interval: 5s | ||
retries: 3 | ||
start_period: 5s | ||
timeout: 5s | ||
|
||
osm-jobs: | ||
image: "ghcr.io/hotosm/osm-sandbox:2024.4.30" | ||
depends_on: | ||
osm: | ||
condition: service_healthy | ||
volumes: | ||
# Mount a tmp directory that will persist between runs | ||
- osm-tmp:/app/tmp | ||
# Mount a storage directory that will persist between runs | ||
- osm-storage:/app/storage | ||
# Mount config between containers | ||
- osm-config:/app/config | ||
# Mount local setting overrides | ||
# - ./settings.local.yml:/app/config/settings.local.yml:ro | ||
tmpfs: | ||
/tmp/pids/ | ||
networks: | ||
- osm-net | ||
restart: unless-stopped | ||
entrypoint: /bin/sh -c | ||
command: | ||
- | | ||
echo "Running background worker" | ||
bundle exec rake jobs:work | ||
osm-cgi: | ||
image: "ghcr.io/hotosm/osm-sandbox/cgimap:${CGIMAP_VERSION:-v2.0.0.pre}" | ||
build: | ||
context: https://github.com/zerebubuth/openstreetmap-cgimap.git#${CGIMAP_VERSION:-v2.0.0} | ||
dockerfile: docker/debian/Dockerfile_bookworm | ||
depends_on: | ||
osm-db: | ||
condition: service_healthy | ||
environment: | ||
CGIMAP_HOST: osm-db | ||
CGIMAP_DBNAME: openstreetmap | ||
CGIMAP_USERNAME: openstreetmap | ||
CGIMAP_PASSWORD: openstreetmap | ||
CGIMAP_MEMCACHE: memcached | ||
CGIMAP_RATELIMIT: 204800 | ||
CGIMAP_MAXDEBT: 250 | ||
CGIMAP_MODERATOR_RATELIMIT: 1048576 | ||
CGIMAP_MODERATOR_MAXDEBT: 1024 | ||
CGIMAP_PORT: 8000 | ||
CGIMAP_INSTANCES: 3 | ||
networks: | ||
- osm-net | ||
restart: unless-stopped | ||
|
||
osm-db: | ||
|
@@ -107,6 +170,14 @@ services: | |
- osm-net | ||
restart: unless-stopped | ||
|
||
memcached: | ||
image: "docker.io/memcached:1.6" | ||
# ports: | ||
# - 11211:11211 | ||
networks: | ||
- osm-net | ||
restart: unless-stopped | ||
|
||
certbot: | ||
image: "ghcr.io/hotosm/osm-sandbox/proxy:certs-init" | ||
profiles: [public] | ||
|
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
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