-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (50 loc) · 1.13 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
services:
mysql:
image: mysql:8.0
container_name: mysql-server
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: gosqladmin
MYSQL_DATABASE: gosqladmin
MYSQL_USER: gosqladmin
MYSQL_PASSWORD: gosqladmin
volumes:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
networks:
- gosqladmin
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
interval: 10s
timeout: 7s
retries: 3
gosqladmin:
build:
context: docker
depends_on:
mysql:
condition: service_healthy
container_name: gosqladmin
ports:
- "8080:8080"
environment:
LOG_LEVEL: debug
SQL_DRIVER: mysql
SQL_HOST: mysql
SQL_PORT: 3306
SQL_DATABASE: gosqladmin
SQL_USER: gosqladmin
SQL_PASSWORD: gosqladmin
SQL_CONN_TIMEOUT: 60s
SQL_READ_TIMEOUT: 30s
SQL_WRITE_TIMEOUT: 30s
SQL_MAX_OPEN_CONNS: 10
SQL_MAX_IDLE_CONNS: 5
SQL_CONN_MAX_LIFETIME: 30m
volumes:
- .:/app
networks:
- gosqladmin
networks:
gosqladmin:
driver: bridge