-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
102 lines (97 loc) · 3.84 KB
/
docker-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
version: '3.7'
x-logging: &default-logging
driver: json-file
options:
max-size: '10m'
max-file: '5'
networks:
traefikpublic:
external:
name: ows-events_traefikpublic
services:
frontend:
build:
context: .
dockerfile: ./frontend/Dockerfile
args:
- NODE_ENV=production
- VITE_STAGE=prod
- VITE_API_URL=https://api.afisha.peredelano.com/api
- VITE_BASE_URL=https://api.afisha.peredelano.com
- VITE_IPREGISTRY_API_KEY=ryy5dlbl3v8y55x4
- VITE_TELEGRAM_AUTH_BOT_NAME
- VITE_MODE=production
- VITE_DOMAIN=https://afisha.peredelano.com
- VITE_GTAG_ID
- VITE_GOOGLE_OAUTH_KEY
logging: *default-logging
restart: always
labels:
- 'traefik.enable=true'
- 'traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https'
- 'traefik.http.middlewares.compressor.compress=true'
- 'traefik.http.middlewares.redirect-https.redirectscheme.scheme=https'
- 'traefik.http.routers.frontend_https.rule=Host(`afisha.peredelano.com`)'
- 'traefik.http.routers.frontend_https.middlewares=sslheader@docker'
- 'traefik.http.routers.frontend_https.middlewares=compressor@docker'
- 'traefik.http.routers.frontend_https.entrypoints=http, https'
- 'traefik.http.routers.frontend_https.tls.certresolver=myresolver'
- 'traefik.http.routers.frontend_http.rule=Host(`afisha.peredelano.com`)'
- 'traefik.http.routers.frontend_http.middlewares=redirect-to-https@docker'
- 'traefik.http.routers.frontend_http.entrypoints=http'
networks:
- traefikpublic
ports:
- '3000:3000'
backend:
build:
context: .
dockerfile: ./backend/Dockerfile
logging: *default-logging
restart: always
depends_on:
- mongo
links:
- mongo
labels:
- 'traefik.enable=true'
- 'traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https'
- 'traefik.http.middlewares.redirect-https.redirectscheme.scheme=https'
- 'traefik.http.routers.backend_https.rule=Host(`api.afisha.peredelano.com`)'
- 'traefik.http.routers.backend_https.middlewares=sslheader@docker'
- 'traefik.http.routers.backend_https.entrypoints=http, https'
- 'traefik.http.routers.backend_https.tls.certresolver=myresolver'
- 'traefik.http.routers.backend_http.rule=Host(`api.afisha.peredelano.com`)'
- 'traefik.http.routers.backend_http.middlewares=redirect-https@docker'
- 'traefik.http.routers.backend_http.entrypoints=http'
environment:
- MODE=prod
- MONGO_URI=mongodb://mongo:27017/prod
- FRONTEND_URL=https://afisha.peredelano.com
- SECRET_KEY
- LOCALIZATION_API_KEY
- GITHUB_PARSING_TOKEN
- PEREDELANOCONF_GOOGLEDOC
- VITE_GOOGLE_OAUTH_KEY
- GA_API_SECRET
- GA_MEASUREMENT_ID
networks:
- traefikpublic
ports:
- '7080:7080'
volumes:
- /root/ows-events/assets/img:/app/assets/img
mongo:
image: mongo:6.0
restart: unless-stopped
command: ['--bind_ip_all']
ports:
- '127.0.0.1:27000:27017'
networks:
- traefikpublic
healthcheck:
test: test $$(echo "rs.initiate().ok || rs.status().ok" | mongo --quiet) -eq 1
interval: 10s
start_period: 30s
volumes:
- /root/db/prod:/data/db