-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (65 loc) · 1.83 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3'
services:
hw_db:
container_name: hw_db
image: postgis/postgis:15-master
restart: ${RESTART_POLICY}
environment:
- POSTGRES_USER=${CMS_DB_USER}
- POSTGRES_DB=${CMS_DB_NAME}
- POSTGRES_PASSWORD=${CMS_DB_PASSWORD}
ports:
- "5432"
volumes:
- ${CMS_DB_VOLUME}:/var/lib/postgresql/data/
hw_memcached:
image: memcached:1.6.12-alpine
container_name: hw_memcached
restart: ${RESTART_POLICY}
ports:
- "11211"
entrypoint:
- memcached
- -m 1024
- -I 10m
hw_web:
container_name: hw_web
build:
context: .
dockerfile: ./docker/cms/Dockerfile
restart: ${RESTART_POLICY}
command: bash -c "/wait && ./docker-entrypoint.sh && gunicorn hwcms.wsgi:application --bind 0.0.0.0:8000 --workers=${CMS_NUM_OF_WORKERS}"
expose:
- 8000
environment:
- WAIT_HOSTS=hw_db:5432,hw_memcached:11211
- WAIT_TIMEOUT=60
- DEBUG=${DEBUG}
- SECRET_KEY=${SECRET_KEY}
- DATABASE_URL=postgis://${CMS_DB_USER}:${CMS_DB_PASSWORD}@hw_db:5432/${CMS_DB_NAME}
- MEMCACHED_URI=hw_memcached:11211
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
- FORCE_SCRIPT_NAME=${FORCE_SCRIPT_NAME}
ports:
- "8000"
volumes:
- ${CMS_STATIC_VOLUME}:/home/app/web/static
- ${CMS_MEDIA_VOLUME}:/home/app/web/media
hw_nginx:
container_name: hw_nginx
image: nginx:1.20.2-alpine
restart: ${RESTART_POLICY}
volumes:
- ${CMS_STATIC_VOLUME}:/wagtail_static
- ${CMS_MEDIA_VOLUME}:/wagtail_media
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
ports:
- "${NGINX_PORT}:80"
depends_on:
- hw_web
networks:
default:
name: ${AHW_DOCKER_NETWORK}
external: true