-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
125 lines (114 loc) · 3.07 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
version: '3'
services:
database:
image: postgres:15-alpine
environment:
POSTGRES_PASSWORD: "${DB_PASS}"
POSTGRES_DB: "${DB_DATABASE}"
ports:
- "5432:5432"
volumes:
- database:/var/lib/postgresql/data
redis:
image: redis:alpine
volumes:
- redis:/data
client:
build:
context: ./client
dockerfile: Dockerfile.dev
image: visualdynamics/client:dev
command: sh -c "yarn prisma generate && yarn dev"
env_file: .env
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"
depends_on:
- database
- server
- mailer
volumes:
- ./client:/app
- /app/node_modules
- /app/.next
server:
build: ./server
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
image: visualdynamics/worker
env_file: .env
command: celery -A server.worker worker --concurrency=2 --loglevel=info
volumes:
- ./server:/var/www/server
- user_data:/var/www/VDfiles
depends_on:
- redis
- mailer
- client
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
redismailer:
image: redis:alpine
volumes:
- redismailer:/data
mailer:
image: murilofuza/simple-mail:0.0.6
env_file: .env
ports:
- "3002:3000"
volumes:
- ./emails:/templates
traefik:
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:
driver: nfsvol
redis:
driver: nfsvol
redismailer:
driver: nfsvol
traefik_acme:
driver: nfsvol
traefik_logs:
driver: nfsvol