-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
26 lines (26 loc) · 852 Bytes
/
docker-compose.yml
File metadata and controls
26 lines (26 loc) · 852 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
version: '3.3'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: 'groovyblogs_dev'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'groovyblogs'
# You can use whatever password you like
MYSQL_PASSWORD: 'groovyblogs'
# Password for root access
MYSQL_ROOT_PASSWORD: 'groovyblogs'
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3308:3306'
expose:
# Opens port 3306 on the container
- '3308'
# Where our data will be persisted
volumes:
- groovyblogs-db:/var/lib/mysql
- ./docker/mysql/init.d:/docker-entrypoint-initdb.d
# Names our volume
volumes:
groovyblogs-db: