-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.production.yml
55 lines (47 loc) · 1.44 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
54
55
##
# This docker-compose file extends the default docker-compose.yml with
# **production** settings.
#
version: '2'
services:
contract_observer:
restart: on-failure
etherdelta_observer:
restart: on-failure
huey_consumer:
restart: on-failure
ticker:
restart: on-failure
websocket_server:
environment:
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}
VIRTUAL_HOST: ${SERVERNAME},api.${SERVERNAME}
VIRTUAL_PORT: "8080"
restart: on-failure
postgres:
volumes:
- postgres-data:/var/lib/postgresql/data
nginx:
image: nginx:alpine
container_name: nginx # Need to name it in a specific way for nginx-dockergen to be able to restart it
ports:
- "443:443"
volumes:
- ./etc/nginx/conf.d:/etc/nginx/conf.d
- ./etc/nginx/vhost.d:/etc/nginx/vhost.d
- ./etc/nginx/certs:/etc/nginx/certs:ro
- ./etc/nginx/html:/usr/share/nginx/html
# Service that updates nginx config to point to the right service
# containers, whenever they change.
nginx-gen:
image: jwilder/docker-gen # also alpine, if you're wondering
volumes_from:
- nginx
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./etc/nginx/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
command: >
-notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
volumes:
postgres-data: