78 lines
2.0 KiB
YAML
78 lines
2.0 KiB
YAML
|
version: "3"
|
||
|
services:
|
||
|
map:
|
||
|
build: .
|
||
|
links:
|
||
|
- db:db
|
||
|
- cache:cache
|
||
|
volumes:
|
||
|
- /containers/map/static:/app/static
|
||
|
- /containers/map/gunicorn.sock:/app/gunicorn.sock
|
||
|
env_file:
|
||
|
- ./environment
|
||
|
command: /bin/sh -c "python3 manage.py migrate && python3 manage.py collectstatic --noinput && gunicorn --bind 0.0.0.0:8000 ojusomap.wsgi"
|
||
|
|
||
|
db:
|
||
|
image: mdillon/postgis:9.6-alpine
|
||
|
volumes:
|
||
|
- /containers/db:/var/lib/postgresql/data
|
||
|
- ./support/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
||
|
ports:
|
||
|
- "127.0.0.1:5432:5432"
|
||
|
env_file:
|
||
|
- ./environment
|
||
|
|
||
|
web:
|
||
|
image: nginx:alpine
|
||
|
volumes:
|
||
|
- ./support/nginx/nginx.template:/etc/nginx/conf.d/nginx.template
|
||
|
- ./support/nginx/directives:/etc/nginx/directives
|
||
|
- /containers/tls/acme:/web/acme
|
||
|
- /containers/tls/certs:/web/certs
|
||
|
- /var/discourse/shared/standalone/nginx.http.sock:/web/run/discourse.sock
|
||
|
- /containers/map/gunicorn.sock:/web/run/gunicorn.sock
|
||
|
- /containers/map/static:/web/static
|
||
|
- weblate-data:/web/weblate/data:ro
|
||
|
ports:
|
||
|
- "80:80"
|
||
|
- "443:443"
|
||
|
links:
|
||
|
- forum:forum
|
||
|
- map:map
|
||
|
- weblate:weblate
|
||
|
env_file:
|
||
|
- ./environment
|
||
|
command: /bin/sh -c "cat /etc/nginx/conf.d/nginx.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
||
|
|
||
|
forum:
|
||
|
image: local_discourse/app
|
||
|
restart: always
|
||
|
hostname: discourse
|
||
|
env_file:
|
||
|
- ./environment
|
||
|
volumes:
|
||
|
- /var/discourse/shared/standalone:/shared
|
||
|
- /var/discourse/shared/standalone/log/var-log:/var/log
|
||
|
command: /sbin/boot
|
||
|
|
||
|
weblate:
|
||
|
image: weblate/weblate
|
||
|
links:
|
||
|
- db:database
|
||
|
- cache
|
||
|
volumes:
|
||
|
- weblate-data:/app/data
|
||
|
env_file:
|
||
|
- ./environment
|
||
|
environment:
|
||
|
- "POSTGRES_USER=weblate"
|
||
|
- "POSTGRES_DATABASE=weblate"
|
||
|
restart: always
|
||
|
|
||
|
cache:
|
||
|
image: memcached:1.4
|
||
|
restart: always
|
||
|
|
||
|
volumes:
|
||
|
weblate-data:
|