-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yaml
68 lines (67 loc) · 1.76 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
version: '3.1'
services:
db:
image: mysql:8.0.29
container_name: my-mysql
command: [ '--default-authentication-plugin=mysql_native_password', '--default-storage-engine=innodb' ]
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=local_db
ports:
- 3306:3306
hostname: db
# monitoring
influxdb:
image: influxdb
container_name: influxdb
ports:
- "8083:8083"
- "8086:8086"
telegraf:
image: telegraf
links:
- influxdb
volumes:
- ./config/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=my-user
- DOCKER_INFLUXDB_INIT_PASSWORD=my-password
- DOCKER_INFLUXDB_INIT_ORG=my-org
- DOCKER_INFLUXDB_INIT_BUCKET=my-bucket
grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3000:3000"
volumes:
- ./config/grafana/conf/grafana.ini:/etc/grafana/grafana.ini
- ./config/grafana/provisioning:/etc/grafana/provisioning
links:
- influxdb
article-server:
image: gin-example/article-server
build:
context: .
dockerfile: cmd/server/Dockerfile
container_name: article-server
ports:
- "8080:8080"
volumes:
- ./config/local.yaml:/config/config.yaml
- ./migrations:/config/migrations
command: article-server --conf /config/config.yaml
restart: always
depends_on:
- "db"
# article-server2:
# image: gin-example/article-server
# container_name: article-server-2
# ports:
# - "9090:9090"
# volumes:
# - ./config/local-2.yaml:/config/config.yaml
# command: article-server --conf /config/config.yaml
# restart: always
# depends_on:
# - "db"