-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.nogpu.prod.yml
119 lines (108 loc) · 3.06 KB
/
docker-compose.nogpu.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
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
version: '3'
services:
database:
image: postgres:15-alpine
environment:
POSTGRES_PASSWORD: "${DB_PASS}"
POSTGRES_DB: "${DB_DATABASE}"
restart: always
ports:
- "5432:5432"
volumes:
- database_prod:/var/lib/postgresql/data
redis:
image: redis:alpine
volumes:
- redis:/data
client:
build: ./client
image: visualdynamics/client:prod
env_file: .env
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.rule=Host(`${VISUALDYNAMICS_URL}`)"
- "traefik.http.routers.client.service=client"
- "traefik.http.services.client.loadbalancer.server.port=3000"
- "traefik.http.routers.client.tls=true"
- "traefik.http.routers.client.tls.certresolver=letsencrypt"
- "traefik.http.routers.client.tls.domains[0].main=${VISUALDYNAMICS_URL}"
- "traefik.http.routers.client.entryPoints=websecure"
depends_on:
- database
- server
- mailer
server:
build: ./server
restart: always
image: visualdynamics/server
command: flask run --host=0.0.0.0 --port=3002
env_file: .env
depends_on:
- redis
volumes:
- ./server:/var/www/server
- user_data:/var/www/VDfiles
worker:
build:
context: ./server
dockerfile: Dockerfile.worker.nogpu
image: visualdynamics/worker-nogpu
restart: always
env_file: .env
command: celery -A server.worker worker --concurrency=3 --loglevel=info
volumes:
- user_data:/var/www/VDfiles
depends_on:
- redis
- mailer
- client
redismailer:
restart: always
image: redis:alpine
volumes:
- redismailer:/data
mailer:
restart: always
image: murilofuza/simple-mail:0.0.6
env_file: .env
volumes:
- ./emails:/templates
traefik:
restart: always
image: traefik
command:
# - "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.watch"
- "--providers.docker.exposedByDefault=false"
- "--certificatesresolvers.letsencrypt.acme.email=greenfrog@email.com" # replace with your email
- "--certificatesresolvers.letsencrypt.acme.storage=acme/acme.json"
- "--certificatesresolvers.letsencrypt.acme.tlschallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencrypt.acme.dnschallenge.delaybeforecheck=0"
- "--entryPoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entryPoints.web.http.redirections.entryPoint.to=websecure"
- "--entryPoints.web.http.redirections.entryPoint.scheme=https"
- "--entryPoints.web.http.redirections.entrypoint.permanent=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik_acme:/acme
- traefik_logs:/logs
ports:
- "80:80"
- "443:443"
volumes:
user_data:
driver: nfsvol
database_prod:
driver: nfsvol
redismailer:
driver: nfsvol
redis:
driver: nfsvol
traefik_acme:
driver: nfsvol
traefik_logs:
driver: nfsvol