-
Notifications
You must be signed in to change notification settings - Fork 57
/
docker-compose.prod.yml
62 lines (56 loc) · 1.54 KB
/
docker-compose.prod.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
version: "3.7"
services:
nginx:
container_name: nginx_prod
image: nginx:1.15-alpine
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
- static_volume:/spdx/src/app/static
- media_volume:/spdx/src/app/media
depends_on:
- spdx
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
spdx:
container_name: spdx_prod
build:
context: ./
dockerfile: dockerfile.prod
image: 410487266669.dkr.ecr.us-west-2.amazonaws.com/spdx/online-tools:1.2.3
expose:
- 8000
volumes:
- ./container_logs:/spdx/container_logs
- static_volume:/spdx/src/app/static
- media_volume:/spdx/src/app/media
env_file: spdx-prod.env
environment:
- PYTHONDONTWRITEBYTECODE=1
- SPDX_REDIS_HOST=redis
- SPDXParser.LocalLicensesDir=/licenses/current
- SPDXParser.OnlyUseLocalLicenses=true
depends_on:
- redis
redis:
image: redis:5.0-alpine
container_name: redis
restart: always
volumes:
- data-volume:/data
expose:
- 6379
volumes:
data-volume:
static_volume:
media_volume: