-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (46 loc) · 1.14 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
services:
mysql:
container_name: sltest_mysql
image: mysql:8.0
hostname: database
ports:
- '3306:3306'
environment:
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- 'mysql_data:/var/lib/mysql'
networks:
- sltest
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-proot"]
retries: 3
timeout: 5s
restart: on-failure
app:
container_name: "sltest_app"
build:
context: .
dockerfile: ./Dockerfile
args:
UID: ${UID}
GID: ${GID}
ports:
- "80:80"
volumes:
- '.:/var/www/html'
networks:
- sltest
depends_on:
- mysql
volumes:
mysql_data:
driver: local
name: sltest_mysql_data
networks:
sltest:
name: sltest_network