-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
183 lines (172 loc) · 5.7 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
version: "3.4"
services:
# webserver to handle all traffic. This can use let's encrypt to generate a SSL cert.
traefik:
image: traefik:v1.7
command:
- --loglevel=INFO
- --api
# Entrypoints
- --defaultentrypoints=https,http
- --entryPoints=Name:http Address::${TRAEFIK_HTTP_PORT:-8000} ${TRAEFIK_HTTP_REDIRECT:-""}
- --entryPoints=Name:https Address::${TRAEFIK_HTTPS_PORT:-8443} ${TRAEFIK_HTTPS_OPTIONS:-TLS}
# Configuration for acme (https://letsencrypt.org/)
- --acme=${TRAEFIK_ACME_ENABLE:-false}
#- --acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
- --acme.email=${ADMIN_USER_ID:-""}
- --acme.entrypoint=https
- --acme.onhostrule=true
- --acme.storage=/config/acme.json
- --acme.httpchallenge.entrypoint=http
- --acme.storage=/config/acme.json
- --acme.acmelogging=true
- --acme.domains=${HOST_NAME:-""}
- --acme.domains=${TRAEFIK_ADDITIONAL_HOST1:-""}
- --acme.domains=${TRAEFIK_ADDITIONAL_HOST2:-""}
# DOCKER
- --docker=true
- --docker.endpoint=unix:///var/run/docker.sock
- --docker.exposedbydefault=false
- --docker.watch=true
# - --docker.domain=docker.localhost
restart: unless-stopped
ports:
- "${TRAEFIK_HTTP_PORT-8000}:${TRAEFIK_HTTP_PORT:-8000}"
- "${TRAEFIK_HTTPS_PORT-8443}:${TRAEFIK_HTTPS_PORT:-8443}"
labels:
- "traefik.enable=true"
- "traefik.backend=traefik"
- "traefik.port=8080"
- "traefik.frontend.rule=PathPrefixStrip: /traefik"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
# - "traefik.http.middlewares.test-auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${DATA:-~/docker_data}/traefik:/config
container_name: "traefik"
# Allow to see all docker containers running, restart and see log files.
portainer:
image: portainer/portainer-ce:latest
command:
- --admin-password=${PORTAINER_PASSWORD:- }
- --host=unix:///var/run/docker.sock
restart: unless-stopped
depends_on:
- traefik
labels:
- "traefik.enable=true"
- "traefik.backend=portainer"
- "traefik.port=9000"
- "traefik.frontend.rule=PathPrefixStrip: /portainer"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DATA:-~/docker_data}/portainer:/data
container_name: "portainer"
db:
image: postgres:11.7
volumes:
- "${DATA:-~/docker_data}/pgvolume:/var/lib/postgresql/data"
ports:
- "5432:5432"
env_file:
- ".env"
environment:
- POSTGRES_USER=${ADMIN_USER_ID:-guest}
- POSTGRES_PASSWORD=${ADMIN_PASSWORD:-guest}
container_name: "db"
pgadmin:
image: dpage/pgadmin4:4.11
depends_on:
- db
- traefik
volumes:
- "${DATA:-~/docker_data}/pga4volume:/var/lib/pgadmin"
env_file:
- ".env"
environment:
- PGADMIN_DEFAULT_EMAIL=${ADMIN_USER_ID:-guest}
- PGADMIN_DEFAULT_PASSWORD=${ADMIN_PASSWORD:-guest}
container_name: "pgadmin"
labels:
- "traefik.enable=true"
- "traefik.backend=pgadmin"
- "traefik.port=80"
- "traefik.frontend.rule=PathPrefix:/pgadmin"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
rabbitmq:
image: rabbitmq:management
container_name: "rabbitmq"
env_file:
- ".env"
restart: unless-stopped
environment:
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbitmq_management path_prefix "/rabbitmq"
- RABBITMQ_DEFAULT_USER=${ADMIN_USER_ID:-guest}
- RABBITMQ_DEFAULT_PASS=${ADMIN_PASSWORD:-guest}
labels:
- "traefik.enable=true"
- "traefik.backend=rabbitmq"
- "traefik.port=15672"
- "traefik.frontend.rule=PathPrefix:/rabbitmq"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
pythonrpcserver:
image: classtranscribe/pythonrpcserver:latest
container_name: "pythonrpcserver"
env_file:
- ".env"
volumes:
- "${DATA:-~/docker_data}/data:/data"
ports:
- "50051:50051"
api:
image: classtranscribe/api:latest
volumes:
- "${DATA:-~/docker_data}/data:/data"
container_name: "api"
depends_on:
- db
- rabbitmq
- traefik
env_file:
- ".env"
labels:
- "traefik.enable=true"
- "traefik.backend=api"
- "traefik.port=80"
- "traefik.frontend.rule=PathPrefix: /api/,/data/,/swag"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
command: "/wait-for rabbitmq:5672 --timeout=50 -- dotnet /app/ClassTranscribeServer.dll"
taskengine:
image: classtranscribe/taskengine:latest
volumes:
- "${DATA:-~/docker_data}/data:/data"
container_name: "taskengine"
depends_on:
- db
- rabbitmq
- pythonrpcserver
env_file:
- ".env"
command: "/wait-for rabbitmq:5672 --timeout=50 -- dotnet /app/TaskEngine.dll"
dem:
image: quaide/dem:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- type: bind
source: ./dem_conf.yml
target: /app/conf.yml
frontend:
image: classtranscribe/frontend:latest
env_file:
.env
depends_on:
- traefik
#- api
labels:
- "traefik.enable=true"
- "traefik.backend=frontend"
- "traefik.port=80"
- "traefik.frontend.rule=PathPrefix: /"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
container_name: "frontend"