File tree Expand file tree Collapse file tree 8 files changed +14
-12
lines changed
docker-entrypoint-initdb.d Expand file tree Collapse file tree 8 files changed +14
-12
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ docker-entrypoint-initdb.d
Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends pv git-lfs \
55 && rm -rf /var/lib/apt/lists/* \
66 # Clear out the local repository of retrieved package files
77 && apt-get clean
8- COPY docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
8+
9+ COPY docker-entrypoint-initdb.tar .
10+
11+ RUN tar -xvzf docker-entrypoint-initdb.tar
12+
913COPY conf.d/mysqld.cnf /etc/mysql/conf.d
1014# The entrypoint script will not run when `serlo.cnf` is in /etc/mysql/conf.d
1115# as well. Thus we store it in another place and use the `serlo-mysql`
Original file line number Diff line number Diff line change 88 @echo " mysql – Connect to local MySQL server with a shell"
99 @echo " rollback – Rollback to local '.sql' file"
1010
11- up :
11+ up : unzip
1212 docker compose up --build --detach
1313
1414down :
1919 --lock-all-tables --default-character-set=utf8mb4 \
2020 --databases serlo > docker-entrypoint-initdb.d/001-init.sql
2121
22+ zip :
23+ tar -zcvf docker-entrypoint-initdb.tar docker-entrypoint-initdb.d
24+
25+ unzip :
26+ tar -xvzf docker-entrypoint-initdb.tar
27+
2228mysql :
2329 docker compose exec -it mysql serlo-mysql
2430
Original file line number Diff line number Diff line change @@ -7,18 +7,14 @@ This repository contains a custom `mysql` docker image. Changes we have made:
77- The command line tool ` pv ` is available as well. It provides a progress bar
88 when a ` .sql ` file is imported. Usage: ` pv file.sql | serlo-mysql `
99
10- ## Requirements
11- - Docker
12- - [ Git LFS] ( https://github.com/git-lfs/git-lfs )
13-
1410## Change DB via migrations
1511
1612In order to change the DB image via DB migrations do the following:
1713
18141 . Run MySQL DB in this repository with ` make up ` .
19152 . Run DB migrations
20163 . Check the changes in the DB via ` make mysql ` .
21- 4 . Make a new dump via ` make dump ` and commit your changes.
17+ 4 . Make a new dump via ` make dump ` and ` make zip ` and commit your changes.
2218
2319## Publish Image
2420
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments