-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
95 lines (90 loc) · 2.9 KB
/
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
version: '3'
services:
mongo:
image: mongo:6.0
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER:-root}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-change_me}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE:-prowire}
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/${MONGO_DATABASE:-prowire} --quiet
interval: 5s
timeout: 10s
retries: 10
redis:
image: redis:7.2
healthcheck:
test: redis-cli ping
interval: 5s
timeout: 10s
retries: 10
api:
build:
context: ./
dockerfile: ./apps/api/Dockerfile
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "${API_PUBLIC_PORT:-54844}:${API_PORT:-54844}"
- "${API_UNSECURE_PUBLIC_PORT:-54845}:${API_UNSECURE_PORT:-54845}"
volumes:
- ${CERTIFICATES_DIR_PATH:-./certs}:/certs
environment:
- API_URL=${API_URL:-http://localhost:54845}
- API_PORT=${API_PORT:-54844}
- API_UNSECURE_PORT=${API_UNSECURE_PORT:-54845}
- SERVER_CERTIFICATE=${SERVER_CERTIFICATE:-/certs/server.crt}
- SERVER_PRIVATE_KEY=${SERVER_PRIVATE_KEY:-/certs/server.key}
- MONGO_CONNECTION_STRING=${MONGO_CONNECTION_STRING:-mongodb://root:change_me@mongo:27017/}
- MONGO_USER
- MONGO_PASSWORD
- MONGO_DATABASE
- REDIS_HOST=${REDIS_HOST:-redis}
- REDIS_PORT=${REDIS_PORT:-6379}
- REDIS_PASSWORD
- AUTHORIZED_REDIRECT_URIS=${SERVER_CERTIFICATE:-prowire://auth/redirect,http://localhost:8080/auth/return}
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- SERVER_ID=${SERVER_ID:-unique}
- ACCESS_TOKEN_EXPIRATION
- ACCESS_TOKEN_SECRET
- REFRESH_TOKEN_KEY_BASE64
- VPN_SERVER_SECRET
- CA_CERTIFICATE=${CA_CERTIFICATE:-/certs/ca.crt}
- CA_PRIVATE_KEY=${CA_PRIVATE_KEY:-/certs/ca.key}
server:
build:
context: ./
dockerfile: ./apps/server/Dockerfile
depends_on:
api:
condition: service_started
ports:
- "${VPN_SERVER_PUBLIC_PORT:-1195}:${VPN_SERVER_PORT:-1195}/udp"
volumes:
- ${CERTIFICATES_DIR_PATH:-./certs}:/certs
environment:
- API_URL=http://api:${API_PORT:-54845}
- VPN_SERVER_SECRET
- VPN_SERVER_ID=${VPN_SERVER_ID:-unique}
- VPN_SERVER_DH_PARAM=${VPN_SERVER_DH_PARAM:-/certs/dh2048.pem}
- VPN_SERVER_PUBLIC_URL=${VPN_SERVER_PUBLIC_URL:-http://localhost:1195}
- VPN_SERVER_PORT=${VPN_SERVER_PORT:-1195}
- NODE_TLS_REJECT_UNAUTHORIZED
cap_add:
- NET_ADMIN
management:
build:
context: ./
dockerfile: ./apps/management/Dockerfile
depends_on:
api:
condition: service_started
ports:
- "${MANAGEMENT_PUBLIC_PORT:-8080}:80"
environment:
- API_URL=${API_URL:-http://localhost:54845}
- MANAGEMENT_URL=${MANAGEMENT_URL:-http://localhost:8080}