-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.production.yml
53 lines (48 loc) · 1.32 KB
/
docker-compose.production.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
# This is a transitional production configuration.
# Traffic or NGINX may or may not be used in the final production configuration
# but the Django container will not expose its port to the host (there will be more than one container).
services:
django: &django
build:
context: .
# This is the most important setting to test the production configuration of Django.
dockerfile: ./compose/production/django/Dockerfile
image: insectai/ami_backend
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
volumes:
- ./config:/app/config
ports:
- "5001:5000"
extra_hosts:
- "db:${DATABASE_IP}"
- "redis:${REDIS_IP}"
command: /start
scale: 1 # Can't scale until the load balancer is within the compose config
restart: always
celeryworker:
<<: *django
scale: 1
ports: []
command: /start-celeryworker
restart: always
celerybeat:
<<: *django
ports: []
command: /start-celerybeat
restart: always
flower:
<<: *django
ports:
- "5550:5555"
command: /start-flower
restart: always
awscli:
build:
context: .
dockerfile: ./compose/production/aws/Dockerfile
env_file:
- ./.envs/.production/.django
volumes:
- ./backups/production/postgres:/backups:z