-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (121 loc) · 3.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
130 lines (121 loc) · 3.3 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
services:
core-api:
build:
context: ./back-end
dockerfile: Dockerfile
container_name: core-api
environment:
NODE_ENV: production
DOCKER_ENV: 'true'
POSTGRES_HOST: ${PGHOST:-postgres}
POSTGRES_PORT: ${PGPORT:-5432}
POSTGRES_DB: ${PGDB:-db}
POSTGRES_USER: ${PGUSER:-postgres}
POSTGRES_PASSWORD: ${PGPASSWORD:-postgres}
ALLOWED_ORIGINS: '${ALLOWED_ORIGINS:-https://localhost:8443}'
DATABASE_URL: "postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-db}"
JWT_SECRET: ${JWT_SECRET:-thisisasecret}
depends_on:
postgres:
condition : service_healthy
restart: unless-stopped
networks:
- postgres-network
postgres:
container_name: postgres
image: postgres
environment:
POSTGRES_USER: ${PGUSER:-postgres}
POSTGRES_PASSWORD: ${PGPASSWORD:-postgres}
POSTGRES_DB: ${PGDB:-db}
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-db} -h localhost" ]
interval: 10s
timeout: 5s
retries: 10
start_period: 5s
networks:
- postgres-network
prometheus:
image: prom/prometheus
extra_hosts:
- "host.docker.internal:host-gateway"
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./back-end/prometheus:/etc/prometheus
- prom-data:/prometheus
- ./nginx/ssl:/etc/prometheus/ssl:ro
networks:
- postgres-network
grafana:
image: grafana/grafana:latest
container_name: grafana
environment:
GF_SERVER_HTTP_PORT : "3002"
GF_SECURITY_ADMIN_USER: ${GF_SECURITY_ADMIN_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD:-SuperSecret123}
restart: unless-stopped
ports:
- "3002:3002"
volumes:
- grafana-storage:/var/lib/grafana
- ./back-end/grafana/dashboards:/var/lib/grafana/dashboards
- ./back-end/grafana/provisioning:/etc/grafana/provisioning
networks:
- postgres-network
socket-chat:
build:
context: ./back-end/websocket/
dockerfile: Dockerfile
container_name: socket-chat
environment:
WS_PORT: ${WS_HOST:-8090}
JWT_SECRET: ${JWT_SECRET:-thisisasecret}
restart: unless-stopped
networks:
- postgres-network
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: nginx-proxy
ports:
- "8443:8443"
- "8080:8080"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
depends_on:
- core-api
- socket-chat
networks:
- postgres-network
restart: unless-stopped
transcendence:
build:
context: ./front-end/
dockerfile: Dockerfile
target: production
container_name: transcendence-front
# ports:
# - '${PORT:-8080}:8080'
environment:
NODE_ENV: production
DOCKER_ENV: 'true'
restart: unless-stopped
networks:
- postgres-network
networks:
postgres-network:
driver: bridge
volumes:
postgres_data:
prom-data: {}
grafana-storage: {}