-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.test.yml
102 lines (97 loc) · 3.95 KB
/
docker-compose.test.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=test
- VITE_API_URL=https://api-test.afisha.peredelano.com/api
- VITE_BASE_URL=https://api-test.afisha.peredelano.com
- VITE_IPREGISTRY_API_KEY=ryy5dlbl3v8y55x4
- VITE_TELEGRAM_AUTH_BOT_NAME
- VITE_MODE=production
- VITE_DOMAIN=test.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-to-https.redirectscheme.scheme=https'
- 'traefik.http.routers.test_frontend_https.rule=Host(`test.afisha.peredelano.com`)'
- 'traefik.http.routers.test_frontend_https.middlewares=sslheader@docker'
- 'traefik.http.routers.test_frontend_https.middlewares=compressor@docker'
- 'traefik.http.routers.test_frontend_https.entrypoints=http, https'
- 'traefik.http.routers.test_frontend_https.tls.certresolver=myresolver'
- 'traefik.http.routers.test_frontend_http.rule=Host(`test.afisha.peredelano.com`)'
- 'traefik.http.routers.test_frontend_http.middlewares=redirect-to-https@docker'
- 'traefik.http.routers.test_frontend_http.entrypoints=http'
networks:
- traefikpublic
ports:
- '3002: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.test_backend_https.rule=Host(`api-test.afisha.peredelano.com`)'
- 'traefik.http.routers.test_backend_https.middlewares=sslheader@docker'
- 'traefik.http.routers.test_backend_https.entrypoints=http, https'
- 'traefik.http.routers.test_backend_https.tls.certresolver=myresolver'
- 'traefik.http.routers.test_backend_http.rule=Host(`api-test.afisha.peredelano.com`)'
- 'traefik.http.routers.test_backend_http.middlewares=redirect-https@docker'
- 'traefik.http.routers.test_backend_http.entrypoints=http'
environment:
- MODE=prod
- MONGO_URI=mongodb://mongo:27017/test
- FRONTEND_URL=https://test.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:
- '7082:7080'
volumes:
- /root/ows-events_test/assets/img:/app/assets/img
mongo:
image: mongo:6.0
restart: unless-stopped
command: ['--bind_ip_all']
ports:
- '127.0.0.1:27002: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/test:/data/db