-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (32 loc) · 865 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (32 loc) · 865 Bytes
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
services:
mysql:
image: mysql:8.0
restart: on-failure:2
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./mysql/my.cnf:/etc/mysql/conf.d/my.cnf
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 20s
retries: 10
volumes:
mysql_data:
# open -a docker
# docker-compose up -d
## docker-compose --env-file .env up -d
# docker logs mysql
# docker-compose down
#Connect to MySQL in Sequel Ace with these settings:
#Host: 127.0.0.1
#Port: 3306
#Username: ${DB_USER} (from your .env file)
#Password: ${DB_PASS} (from your .env file)
#Database: pathfinder