-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
105 lines (98 loc) · 2.56 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
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
version: "3.0"
networks:
file-server:
services:
postgres:
image: postgres:14.9
restart: always
environment:
POSTGRES_DB: fileserver
POSTGRES_USER: fileserver
POSTGRES_PASSWORD: fileserver
volumes:
- ./store/pg/data:/var/lib/postgresql/data
ports:
- "5435:5432"
networks:
- file-server
node-exporter:
image: prom/node-exporter:v1.6.1
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
ports:
- "9100:9100"
networks:
- file-server
prometheus:
image: prom/prometheus:v2.47.0
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- '9090:9090'
depends_on:
- node-exporter
networks:
- file-server
grafana:
image: grafana/grafana:10.1.1
container_name: grafana
volumes:
- ./grafana:/etc/grafana
command:
- '--config=/etc/grafana/grafana.ini'
ports:
- "3001:3001"
depends_on:
- prometheus
networks:
- file-server
file-server:
build:
context: .
dockerfile: ./cmd/api/deploy/Dockerfile
container_name: file-server
environment:
- HTTP_SERVER_HOST=localhost
- HTTP_SERVER_PROTOCOL=http
- HTTP_SERVER_PORT=36000
- HTTP_SERVER_TLS_PORT=37000
- HTTP_SERVER_CERT_FILE=rest-api-file-server.crt
- HTTP_SERVER_CERT_KEY=rest-api-file-server.key
- HTTP_SERVER_READ_TIMEOUT_SECONDS=60
- HTTP_SERVER_WRITE_TIMEOUT_SECONDS=60
- HTTP_SERVER_TLS_ENABLED=False
- FILE_SERVER_BASE_PATH=/go/src/app
- POSTGRES_DSN=postgres://fileserver:fileserver@postgres/fileserver?sslmode=disable
- POSTGRES_HOST=localhost
- POSTGRES_PORT=5432
- POSTGRES_DATABASE=fileserver
- POSTGRES_DATABASE_USER=fileserver
- POSTGRES_DATABASE_PASSWORD=fileserver
- POSTGRES_MAX_IDLE_CONNECTIONS=20
- POSTGRES_MAX_OPEN_CONNECTIONS=100
- POSTGRES_CONNECTION_MAX_LIFETIME_SECONDS=300
- POSTGRES_CONNECTION_MAX_IDLE_TIME_SECONDS=300
- POSTGRES_MIGRATIONS_URL=file://../../store/pg/migrations
command: ["./wait-for-it.sh", "postgres:5435", "--timeout=60", "--", "./file-server"]
ports:
- "8080:36000"
depends_on:
- postgres
- prometheus
- node-exporter
- grafana
networks:
- file-server
admin-ui:
build: ./admin-ui
ports:
- "3000:3000"
networks:
- file-server