-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
26 lines (25 loc) · 1.01 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
# Docker compose for development
# It will start a MySQL container and bootstrap the DB.
#
# Pay attention: You also need to INSERT a Project Manager for test purposes.
# Contact a team member to get a GitHub/GitLab access token for test.
#
# Start: > docker-compose -f docker-compose.yml up --build
# Stop: > docker-compose -f docker-compose.yml down --remove-orphans
version: '3'
services:
mysql_db:
platform: linux/x86_64 # workaround for Apple M1, comment out on Windows.
image: mysql:8.0-debian
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
ports:
- '3306:3306'
volumes:
- ./src/test/resources/createDb.sql:/docker-entrypoint-initdb.d/init-database.sql # Create DB Script.
- ./src/test/resources/insertTestDataLocalDev.sql:/docker-entrypoint-initdb.d/insert-test-data.sql # Insert data for local dev.
- mysql-db-data:/var/lib/mysql # persist the data (between containers) in a Volume.
volumes:
mysql-db-data:
driver: local