-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
118 lines (111 loc) · 3.51 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "3.7"
services:
public_api:
image: localhost:5443/public_api:latest
volumes:
- ${WORKING_DIR:-/mnt/efs}/public_api/app:/app
networks:
- traefik-public
- auth
- services
restart: unless-stopped
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.services.public-api.loadbalancer.server.port=80
- traefik.http.routers.public-api.rule=Host(`api.${DOMAIN}`)
- traefik.http.routers.public-api.entrypoints=http
# HTTPS
- traefik.http.middlewares.public-api-redirect-sec.redirectscheme.scheme=https
- traefik.http.routers.public-api.middlewares=public-api-redirect-sec
- traefik.http.routers.public-api-sec.rule=Host(`api.${DOMAIN}`)
- traefik.http.routers.public-api-sec.entrypoints=https
- traefik.http.routers.public-api-sec.tls.certResolver=dnsCertResolver
- traefik.http.routers.public-api-sec.tls.domains[0].main=*.${DOMAIN}
replicas: 1
placement:
constraints:
- node.labels.type!=swarm-leader
auth:
image: localhost:5443/auth:latest
volumes:
- ${WORKING_DIR:-/mnt/efs}/auth/app:/app
networks:
- traefik-public
- auth
restart: unless-stopped
deploy:
replicas: 1
placement:
constraints:
- node.labels.type!=swarm-leader
redis:
image: redislabs/rejson
volumes:
- ${WORKING_DIR:-/mnt/efs}/auth/redis:/redis
networks:
- auth
working_dir: /redis/data
command: ["redis-server", "/redis/redis.config"]
deploy:
replicas: 1
placement:
constraints:
- node.labels.type!=swarm-leader
#couchdb:
# image: couchdb:latest
# container_name: couchdb
# ports:
# - "5984:5984"
# volumes:
# - ${WORKING_DIR:-/mnt/efs}/couchdb/data:/opt/couchdb/data
# networks:
# - services
# - pyspider
# environment:
# - COUCHDB_NAME=couchdb
# - COUCHDB_PORT_5984_TCP_ADDR=couchdb
# - COUCHDB_PORT_5984_TCP_PORT=5984
# - COUCHDB_USER=user
# - COUCHDB_PASSWORD=password
# deploy:
# replicas: 2
webservice:
image: httpd:2.4-alpine
container_name: webservice
volumes:
- ${WORKING_DIR:-/mnt/efs}/webservice/public-html/:/usr/local/apache2/htdocs/
networks:
- traefik-public
- auth
- services # backend needs connection to couchDB for watchlist updates for example
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.services.webservice.loadbalancer.server.port=80
- traefik.http.routers.webservice.rule=Host(`${DOMAIN}`)
- traefik.http.routers.webservice.entrypoints=http
# HTTPS
- traefik.http.middlewares.webservice-redirect-sec.redirectscheme.scheme=https
- traefik.http.routers.webservice.middlewares=webservice-redirect-sec
- traefik.http.routers.webservice-sec.rule=Host(`${DOMAIN}`)
- traefik.http.routers.webservice-sec.entrypoints=https
- traefik.http.routers.webservice-sec.tls.certResolver=dnsCertResolver
- traefik.http.routers.webservice-sec.tls.domains[0].main=${DOMAIN}
replicas: 1
restart: unless-stopped
networks:
traefik-public:
name: traefik-public
external: true
registry:
name: registry
external: true
auth:
name: auth
external: true
services:
name: services
external: true