-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
94 lines (93 loc) · 2.88 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
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
services:
layersdb:
image: mariadb:lts
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --wait_timeout=28800 --max_allowed_packet=128M
environment:
- "MYSQL_DATABASE=layersdb"
- "MYSQL_ROOT_PASSWORD=testingpw"
restart: unless-stopped
layersapp:
depends_on:
- layersdb
build: .
image: halstead/layerindex-app
hostname: localhost
volumes:
- layersmeta:/opt/workdir
- logvolume:/opt/layerindex-task-logs:z
environment:
#- "SECRET_KEY=<set this here>"
- "DATABASE_USER=root"
- "DATABASE_PASSWORD=testingpw"
- "DATABASE_HOST=layersdb"
- "RABBITMQ_DEFAULT_USER=guest"
- "RABBITMQ_DEFAULT_PASS=guest"
#- "EMAIL_HOST=<set this here>"
#- "EMAIL_PORT=<set this here if not the default>"
#- "EMAIL_USER=<set this here if needed>"
#- "EMAIL_PASSWORD=<set this here if needed>"
#- "EMAIL_USE_SSL=<set this here if needed>"
#- "EMAIL_USE_TLS=<set this here if needed>"
#- "DEBUG=1"
restart: unless-stopped
layersweb:
depends_on:
- layersapp
build:
context: .
dockerfile: Dockerfile.web
image: halstead/layerindex-web
hostname: localhost
ports:
- "8080:80"
## For production you want these instead
# - "80:80"
# - "443:443"
volumes:
- layersstatic:/usr/share/nginx/html
- ./docker/certs:/opt/cert
- certbotwww:/var/www/certbot:z
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
restart: unless-stopped
layersrabbit:
image: rabbitmq:alpine
restart: unless-stopped
environment:
- "RABBITMQ_DEFAULT_USER=guest"
- "RABBITMQ_DEFAULT_PASS=guest"
layerscelery:
depends_on:
- layersdb
- layersapp
- layersrabbit
image: halstead/layerindex-app
volumes:
- layersmeta:/opt/workdir
- logvolume:/opt/layerindex-task-logs:z
environment:
#- "SECRET_KEY=<set this here>"
- "DATABASE_USER=layers"
- "DATABASE_PASSWORD=testingpw"
- "DATABASE_HOST=layersdb"
- "RABBITMQ_DEFAULT_USER=guest"
- "RABBITMQ_DEFAULT_PASS=guest"
#- "EMAIL_HOST=<set this here>"
#- "EMAIL_PORT=<set this here if not the default>"
#- "EMAIL_USER=<set this here if needed>"
#- "EMAIL_PASSWORD=<set this here if needed>"
#- "EMAIL_USE_SSL=<set this here if needed>"
#- "EMAIL_USE_TLS=<set this here if needed>"
#- "DEBUG=1"
restart: unless-stopped
command: /usr/local/bin/celery --workdir=/opt/layerindex --app layerindex.tasks worker --loglevel=INFO
#layerscertbot:
# image: certbot/certbot
# volumes:
# - ./docker/certs:/opt/cert
# - certbotwww:/var/www/certbot:z
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
layersmeta:
layersstatic:
logvolume:
certbotwww: