Files
sprpcb/docker-compose.yml
2026-04-20 11:20:59 -04:00

220 lines
4.6 KiB
YAML

services:
arches_db:
container_name: arches_db
image: postgis/postgis:14-3.2
env_file:
- ./.env
environment:
- PGUSER=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgis
- POSTGRES_MULTIPLE_EXTENSIONS=postgis,postgis_topology
restart: always
volumes:
- postgres-data:/var/lib/postgresql/data/
- postgres-log:/var/log/postgresql
- ./init-unix.sql:/docker-entrypoint-initdb.d/init.sql # to set up the DB template
- ../arches_data/:/arches_data
ports:
- '5434:5432'
logging:
driver: "json-file"
options:
max-size: "10k"
max-file: "10"
networks:
- arches_net
arches_elasticsearch:
container_name: arches_elasticsearch
image: elasticsearch:8.5.3
restart: always
env_file:
- ./.env
environment:
- TZ="${TZ}"
- xpack.security.enabled=false
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms400m -Xmx400m"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
ports:
- "9202:9200"
- "9302:9300"
logging:
driver: "json-file"
options:
max-size: "10k"
max-file: "10"
networks:
- arches_net
arches_redis:
container_name: arches_redis
image: "redis:6-alpine"
restart: always
ports:
- "6379:6379"
volumes:
- "redisdata:/data"
command: "redis-server"
logging:
driver: "json-file"
options:
max-size: "10k"
max-file: "10"
networks:
- arches_net
pg_tilesrv:
container_name: pg_tilesrv
image: pramsey/pg_tileserv:latest-amd64
restart: always
tty: true
environment:
- DATABASE_URL=${DATABASE_URL}
ports:
- 7800:7800
expose:
- 7800:7800
networks:
- arches_net
arches:
container_name: arches
image: arches
env_file:
- ./.env
build:
context: .
dockerfile: arches/Dockerfile
args:
ARCHES_PROJECT: ${ARCHES_PROJECT}
ARCHES_ROOT: ${ARCHES_ROOT}
APP_ROOT: ${APP_ROOT}
APP_COMP_FOLDER: ${APP_COMP_FOLDER}
environment:
- DEBUG="${DJANGO_DEBUG}"
- ARCHES_PROJECT=${ARCHES_PROJECT}
stdin_open: true # docker run -i
tty: true # docker run -t
ports:
- "5432:5432"
- 8004:8000
- 5678:5678
- 5984:5984
depends_on:
- arches_db
- arches_elasticsearch
- arches_redis
command:
- run_arches
expose:
- 8004:8000
volumes:
- arches-log:/web_root/logs
- arches-static:/static_root
- arches-app:/arches_app
- ../arches_data/:/arches_data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
networks:
- arches_net
nginx:
container_name: nginx
build: ./nginx
image: arches_via_docker/nginx
env_file:
- ./.env
environment:
- DOMAINS="${DOMAINS}"
- DEPLOY_HOST="${DEPLOY_HOST}"
- CERT_PATH="${CERT_PATH}"
- DJANGO_PORT="${DJANGO_PORT}"
volumes:
- logs_nginx:/logs/nginx
- nginx_ssl:/etc/nginx/ssl
- certbot_certs:/etc/letsencrypt
- arches_certbot:$CERT_PATH
- arches-static:/static_root
- ./html:$NGINX_HTML_PATH
ports:
- "80:80"
- "443:443"
restart: always
depends_on:
- arches
- pg_tilesrv
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
networks:
- arches_net
certbot:
container_name: certbot
build: ./certbot
image: arches_oc/certbot
env_file:
- ./.env
volumes:
- certbot_certs:/etc/letsencrypt
- arches_certbot:$CERT_PATH
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"
networks:
- arches_net
cron:
container_name: cron
build: ./cron
image: arches_via_docker/cron
environment:
COMPOSE_PROJECT_NAME: "${COMPOSE_PROJECT_NAME}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./:/workdir:ro
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"
networks:
- arches_net
networks:
arches_net:
#driver: bridge
#name: arches_net
external: true
name: sprpcb_net
volumes:
nginx_ssl:
external: true
certbot_certs:
external: true
arches_certbot:
external: true
redisdata:
couchdb-data:
couchdb-log:
postgres-data:
postgres-log:
elasticsearch-data:
arches-log:
arches-static:
arches-app:
logs_nginx: