-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.yml
36 lines (33 loc) · 1.03 KB
/
build.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
version: '3'
services:
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: public.ecr.aws/i4c2l4g3/understory:${DJANGO_VERSION}
depends_on:
- postgres
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
environment:
- DJANGO_SETTINGS_MODULE=understory.settings.production
container_name: understory_production_django
volumes:
- ./static:/code/static # whitenoise handles this. Ensure user running docker has r/w.
- ./media:/code/media # nginx. Ensure user running docker has r/w.
ports:
- "8000:5000"
command: /start
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: public.ecr.aws/i4c2l4g3/understory:${POSTGRES_VERSION}
volumes:
- ./production_postgres_data:/var/lib/postgresql/data:Z
- ./production_postgres_data_backups:/backups:z
env_file:
- ./.envs/.production/.postgres
ports:
- "5432:5432"