-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
executable file
·101 lines (96 loc) · 2.41 KB
/
docker-compose.yaml
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
version: "3.8"
# for development
services:
frontend:
container_name: frontend
build:
context: .
dockerfile: docker/frontend/frontend.Dockerfile
image: transcendence_frontend
volumes:
- ${PWD}:/app/
# ports:
# - 4000:4000
restart: unless-stopped
command: npm start
backend:
container_name: backend
env_file:
- ./.env
build:
context: .
dockerfile: docker/backend/backend.Dockerfile
image: transcendence_backend
# ports:
# - 8000:8000
volumes:
- ${PWD}:/app/
entrypoint: /app/docker/backend/backend.sh
restart: unless-stopped
depends_on:
- db
db:
image: postgres
container_name: database
environment:
POSTGRES_DB: transcend_users_db
POSTGRES_USER: transcend_user
POSTGRES_PASSWORD: transcend_pwd
ports:
- "5432:5432"
restart: unless-stopped
prometheus:
image: prom/prometheus
container_name: prometheus
user: "root:root"
ports:
- "9090:9090"
volumes:
- ./docker/prometheus/:/etc/prometheus/
- ./docker/data/prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus/data'
- '--storage.tsdb.retention.time=30d'
restart: unless-stopped
postgres-exporter:
image: wrouesnel/postgres_exporter
container_name: postgres-exporter
environment:
- DATA_SOURCE_NAME=postgresql://transcend_user:transcend_pwd@db:5432/transcend_users_db?sslmode=disable
ports:
- "9187:9187"
restart: unless-stopped
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
user: "root:root"
ports:
- '3200:3200'
volumes:
- ./docker/data/grafana-data:/var/lib/grafana
- ./docker/grafana/provisioning/:/etc/grafana/provisioning/
- ./docker/grafana/defaults.ini:/etc/grafana/grafana.ini:ro
nginx:
container_name: nginx
env_file:
- ./.env
build:
context: .
dockerfile: docker/nginx/nginx.Dockerfile
args:
FRONTEND_URL: ${FRONTEND_URL}
BACKEND_URL: ${BACKEND_URL}
SERVER: ${SERVER}
LOCATION: ${LOCATION}
entrypoint: /app/docker/nginx/nginx.sh
volumes:
- ${PWD}:/app/
image: transcendence_nginx
ports:
- 80:80
- 443:443
depends_on:
- frontend
- backend
restart: unless-stopped