Skip to content

Commit ae6d42a

Browse files
committed
migration MySQL 8 example
Make mariadb-dump a one-shot container
1 parent 5b21eb3 commit ae6d42a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/migration-8.0/compose-mysql8.0.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ services:
4949
<<: *common-attributes # aliases
5050
container_name: ${MARIADB_DUMP_name}
5151
depends_on:
52-
mysql:
53-
condition: service_healthy
52+
mysql:
53+
condition: service_healthy
54+
restart: "no"
55+
command: /docker-entrypoint-initdb.d/dump-mysql.sh
5456
volumes:
5557
- mysqldump:/etc/dump/
5658
- ./dump-mysql.sh:/docker-entrypoint-initdb.d/dump-mysql.sh
@@ -60,8 +62,7 @@ services:
6062
container_name: ${MARIADB_MIGRATED_name}
6163
depends_on:
6264
mariadb-dump:
63-
condition: service_healthy
64-
# restart: true
65+
condition: service_completed_successfully
6566
volumes:
6667
- mysqldump:/etc/dump/
6768
- ./migrate-mariadb.sh:/docker-entrypoint-initdb.d/migrate-mariadb.sh
@@ -77,4 +78,4 @@ volumes:
7778
o: bind
7879

7980
networks:
80-
backend:
81+
backend:

0 commit comments

Comments
 (0)