-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
45 lines (43 loc) · 968 Bytes
/
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
version: "3.8"
services:
web:
build:
context: .
dockerfile: Dockerfile
container_name: go-test-server
ports:
- 9090:9090
depends_on:
mysql:
condition: service_healthy
volumes:
- ./config.json:/app/config.json
adminer:
container_name: go-test-adminer
hostname: adminer
image: adminer:4.8.1
restart: always
ports:
- 8080:8080
environment:
ADMINER_DEFAULT_SERVER: go-test-mysql
ADMINER_DESIGN: dracula
depends_on:
mysql:
condition: service_healthy
mysql:
image: mysql:8.0
platform: linux/x86_64
container_name: go-test-mysql
command: mysqld --user=root
ports:
- 3306:3306
environment:
MYSQL_DATABASE: article
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: root
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 10