-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (110 loc) · 2.71 KB
/
docker-compose.yml
File metadata and controls
115 lines (110 loc) · 2.71 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: "3.3"
services:
db:
build:
context: .
dockerfile: Dockerfile_pg
volumes:
- metadata2:/var/lib/postgresql/data
networks:
- ddw_net
web:
build:
context: .
dockerfile: Dockerfile
volumes:
- ".:/src"
expose:
- "80"
depends_on:
- db
environment:
- S3_KEY
- S3_SECRET
- FTSUSER
- FTSPASS
- DJANGO_DEV
- DJANGO_SECRET_KEY
- EMAIL_HOST_PASSWORD
- GITHUB_TOKEN
- CELERY_BROKER_URL=amqp://admin:ddw_analyst_ui@rabbitmq:5672/myvhost
- SLACK_BOT_TOKEN
- SLACK_CHANNEL_ID
- BASE_URL
- API_BASE_URL
networks:
- ddw_net
spotlights:
build:
context: .
dockerfile: Dockerfile_spotlights_api
expose:
- "8000"
depends_on:
- db
networks:
- ddw_net
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
environment:
- VIRTUAL_HOST=ddw.devinit.org
volumes:
- ./config/nginx:/etc/nginx/conf.d
- ./static:/static
- ./ssl:/etc/ssl/
restart: always
command: "/bin/sh -c 'while :; do sleep 12h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
depends_on:
- web
networks:
- ddw_net
rabbitmq:
image: rabbitmq:3.11-management-alpine
ports:
- 4369:4369
- 5671:5671
- 5672:5672
- 15672:15672
restart: always
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=ddw_analyst_ui
- RABBITMQ_DEFAULT_VHOST=myvhost
networks:
- ddw_net
celery:
image: ddw-analyst-ui_web:latest
command: celery -A ddw_analyst_ui worker -l info
depends_on:
- web
- rabbitmq
environment:
- CELERY_BROKER_URL=amqp://admin:ddw_analyst_ui@rabbitmq:5672/myvhost
networks:
- ddw_net
certbot:
container_name: certbot
image: certbot/certbot:latest
depends_on:
- nginx
env_file: .env
environment:
- SITE_URL
- SPOTLIGHTS_URL
entrypoint: /bin/sh -c "certbot certonly --webroot --webroot-path=/var/www/certbot/letsencrypt --email di-devs@devinit.org --agree-tos --no-eff-email -d $SITE_URL && certbot certonly --webroot --webroot-path=/var/www/certbot/spotlights --email di-devs@devinit.org --agree-tos --no-eff-email -d $SPOTLIGHTS_URL && trap exit TERM; while :; do certbot renew --deploy-hook /etc/letsencrypt/certbot_success.sh; sleep 12h & wait $${!}; done;"
volumes:
- ./static:/var/www/certbot/
- ./ssl:/etc/letsencrypt/
- ./certbot_logs:/var/log/letsencrypt
volumes:
metadata2:
external: true
networks:
ddw_net:
ipam:
driver: default
config:
- subnet: 172.22.0.0/16