-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
52 lines (47 loc) · 1.12 KB
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.1'
services:
db:
image: mysql
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ./init-db:/docker-entrypoint-initdb.d
- sql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
adminer:
image: adminer
restart: always
ports:
- 8080:8080
goapp:
build:
context: .
dockerfile: ./Dockerfile
environment:
MYSQL_SERVER_ADDRESS: ${MYSQL_SERVER_ADDRESS}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
SERVER_PORT: ${SERVER_PORT}
restart: always
ports:
- 80:80
depends_on:
db:
condition: service_healthy
volumes:
sql-data:
name: sql-data
driver: local
networks:
default:
name: ssmc_network