-
-
Notifications
You must be signed in to change notification settings - Fork 228
/
docker-compose.dbtests.yml
41 lines (39 loc) · 1.58 KB
/
docker-compose.dbtests.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
services:
# Stock mysql database. Root password is hardcoded for now
db:
image: mysql/mysql-server:latest
command: --log-bin-trust-function-creators=ON
restart: always
volumes:
- mysql_data_testing:/var/lib/mysql
ports:
# Exposing via the port specified for Grapher
- "${GRAPHER_TEST_DB_PORT}:3306"
environment:
MYSQL_ROOT_PASSWORD: weeniest-stretch-contaminate-gnarl
MYSQL_ROOT_HOST: "%"
# mysql:8.0 container with slight augmentation (+curl, +unzip, +ssh client, ...) for running the DB init scripts
# These init scripts check if the grapher database and users are missing, if so they create them
# and pull the data to have a working dev environment.
db-load-data:
build:
context: ./devTools/docker/mysql-init-docker
# image: mysql/mysql-server:latest
command: "/app/create-test-db.sh"
volumes:
- ./devTools/docker:/app
- ./db/migration:/migration
- ./tmp-downloads:/tmp-downloads
# - ~/.ssh:/user/.ssh # map the .ssh directory into the container so it knows about the owid-live ssh configuration
# - ${SSH_AUTH_SOCK}:/ssh-agent # Forward the SSH agent socket into the container
environment:
DB_ROOT_PASS: weeniest-stretch-contaminate-gnarl
DB_ROOT_HOST: db
DATA_FOLDER: "/tmp-downloads"
# SSH_AUTH_SOCK: "/ssh-agent"
env_file:
- .env
depends_on:
- db
volumes:
mysql_data_testing: