-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·52 lines (47 loc) · 1.23 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
version: '3'
services:
db:
restart: always
image: postgres:12
environment:
POSTGRES_DB: database_name
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- '5432:5432'
volumes:
- db:/var/lib/postgresql/data # Since docker 1.9.0 this command auto-creates a 'db' named volume to be used.
- ./test/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
go_rest_boilerplate:
restart: always
build: .
environment:
DB_HOST: go-clean-boilerplate_db_1
DB_NAME: database_name
DB_USER: adol
DB_PORT: 5432
SERVER_PORT: 8080
STATSD_HOST: go-clean-boilerplate_statsd_exporter_1
STATSD_PORT: 9125
links:
- db
depends_on:
- db
ports:
- "8080:8080"
statsd_exporter:
image: prom/statsd-exporter
command: "--log.level=debug --statsd.mapping-config=/tmp/statsd_mapping.conf"
ports:
- "9102:9102"
- "9125:9125/udp"
volumes:
- "./config/metrics/statsd_mapping.conf:/tmp/statsd_mapping.conf"
prometheus:
image: prom/prometheus
ports:
- "9000:9090"
volumes:
- "./config/metrics:/etc/prometheus"
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
volumes:
db: {}