konova/docker-compose.yml
mpeltriaux f50f17d593 Docker worker enhancement
* drops docker worker process in favor of background celery worker on main process
* changes uploaded files folder into host-based folder
2022-03-09 14:03:50 +01:00

58 lines
1.5 KiB
YAML

version: '3.3'
services:
redis:
image: redis
container_name: "konova-redis-cache"
volumes:
- /redis/data:/bitnami/redis/data
environment:
- REDIS_PASSWORD=CHANGE_ME
konova:
external_links:
- postgis:db
- arnova-nginx-server:arnova
build: .
container_name: "konova-docker"
command: sh -c 'celery -A konova worker -l INFO --detach && gunicorn konova.wsgi:application --bind 0.0.0.0:8000'
restart: always
volumes:
- .:/konova
- /path/to/host/folder:/konova_uploaded_files
- static_file_volume:/konova/static # Point to the volume for static files. Shared with nginx service
expose:
- 8000
depends_on:
- redis
environment:
- POSTGRES_NAME=konova
- POSTGRES_PORT=5432
- POSTGRES_PASSWORD=CHANGE_ME
- POSTGRES_USER=konova
- POSTGRES_HOST=db
- REDIS_HOST=redis
- SSO_HOST=CHANGE_ME_TO_SSO_HOST_URL
- SMTP_HOST=172.17.0.1
- SMTP_PORT=25
- SMTP_REAL_REPLY_MAIL=ksp-servicestelle@sgdnord.rlp.de
nginx:
build: ./nginx
container_name: "konova-nginx-server"
ports:
- "1337:80"
depends_on:
- konova
volumes:
- static_file_volume:/konova/static # Point to the volume for static files. Shared with konova service
# Instead of an own, new network, we need to connect to the existing one, which is provided by the postgis container
# NOTE: THIS NETWORK MUST EXIST
networks:
default:
external:
name: postgis_nat_it_backend
volumes:
static_file_volume: