-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.prod.yml
107 lines (97 loc) · 2.61 KB
/
compose.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
services:
api:
image: labioquim/qsar-api:prod
build:
context: .
dockerfile: apps/api/Dockerfile
env_file: .env
restart: always
volumes:
- files:/files
ui:
build:
context: .
dockerfile: apps/ui/Dockerfile
image: labioquim/qsar-ui:prod
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.services.ui.loadbalancer.server.port=3000"
- "traefik.http.routers.ui.rule=Host(`${UI_URL}`)"
- "traefik.http.routers.ui.service=ui"
- "traefik.http.routers.ui.tls=true"
- "traefik.http.routers.ui.tls.certresolver=letsencrypt"
- "traefik.http.routers.ui.tls.domains[0].main=${UI_URL}"
- "traefik.http.routers.ui.entryPoints=websecure"
depends_on:
- api
- database
links:
- api
- database
database:
image: postgres:15-alpine
environment:
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "qsar"
restart: always
ports:
- "5432:5432"
volumes:
- database:/var/lib/postgresql/data
redismailer:
image: redis:alpine
restart: always
volumes:
- redis:/data
mailer:
image: murilofuza/simple-mail:0.0.6
env_file: .env
volumes:
- ./emails:/templates
redis:
image: redis:alpine
restart: always
volumes:
- redis:/data
# INFRA
traefik:
image: traefik
restart: always
command:
- "--log.level=DEBUG"
- "--api.dashboard=false"
- "--providers.docker=true"
- "--providers.docker.exposedByDefault=false"
- "--providers.docker.watch=true"
- "--certificatesresolvers.letsencrypt.acme.email=ivoprovensi1@gmail.com" # replace with your email
- "--certificatesresolvers.letsencrypt.acme.storage=acme/acme.json"
- "--certificatesresolvers.letsencrypt.acme.tlschallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.analytics.address=:8000"
- "--entryPoints.web.address=:80"
- "--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
- 8000:8000
volumes:
traefik_acme:
driver: nfsvol
traefik_logs:
driver: nfsvol
database:
driver: nfsvol
files:
driver: nfsvol
redis:
driver: nfsvol
redismailer:
driver: nfsvol