-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
69 lines (64 loc) · 1.8 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
version: '3'
services:
cert-generator:
build:
context: ./certs
dockerfile: certs.Dockerfile
volumes:
- ./certs/ssl:/certs
- ./certs/scripts/generate_cert.sh:/generate_cert.sh
environment:
SERVER_KEY_NAME: server.key
SERVER_CERT_NAME: server.crt
command: sh -c "./generate_cert.sh"
networks:
- domex
next-app:
build:
context: ./frontend
dockerfile: prod.Dockerfile
args:
NEXT_PUBLIC_ICESERVER: ${NEXT_PUBLIC_ICESERVER:-local}
NEXT_PUBLIC_SERVER_URL: ${NEXT_PUBLIC_SERVER_URL:-https://192.168.2.5/backend}
# Set NODE_TLS_REJECT_UNAUTHORIZED to 0 to allow self-signed certificates in production (only for local network testing, not recommended for production use)
NODE_TLS_REJECT_UNAUTHORIZED: '0'
restart: always
environment:
PORT: ${FRONT_INTERNAL_PORT:-3000}
networks:
- domex
backend:
build:
context: ./backend
dockerfile: prod.Dockerfile
restart: always
environment:
NODE_ENV: production
PORT: ${BACK_INTERNAL_PORT:-5000}
HOST: 0.0.0.0
ROOM_IDS_LENGTH: ${ROOM_IDS_LENGTH:-5}
networks:
- domex
nginx:
image: nginx:alpine
restart: always
ports:
- ${EXTERNAL_HTTP_PORT:-80}:80
- ${EXTERNAL_HTTPS_PORT:-443}:443
volumes:
- ./nginx/templates:/etc/nginx/templates
- ./certs/ssl:/etc/nginx/certs:ro
environment:
NGINX_ENVSUBST_OUTPUT_DIR: '/etc/nginx'
FRONT_INTERNAL_PORT: ${FRONT_INTERNAL_PORT:-3000}
BACK_INTERNAL_PORT: ${BACK_INTERNAL_PORT:-5000}
EXTERNAL_HTTP_PORT: ${EXTERNAL_HTTP_PORT:-80}
EXTERNAL_HTTPS_PORT: ${EXTERNAL_HTTPS_PORT:-443}
networks:
- domex
depends_on:
- cert-generator
- next-app
- backend
networks:
domex: