From 9504bb5ccdb548d35ec83ecb49609894fd0eed16 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Wed, 1 May 2024 00:52:23 +0200 Subject: [PATCH] fix: Running migration Docker container on Windows (#432) --- docker/migration/Dockerfile | 3 ++- docker/migration/start.sh | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 docker/migration/start.sh diff --git a/docker/migration/Dockerfile b/docker/migration/Dockerfile index 162d5039c..190c1b389 100644 --- a/docker/migration/Dockerfile +++ b/docker/migration/Dockerfile @@ -37,4 +37,5 @@ RUN git clone https://github.com/vishnubob/wait-for-it.git ADD docker/migration/start.sh / RUN chmod +x /start.sh -CMD ["/start.sh"] \ No newline at end of file +# Once we listen the mysql port run the migration task. +CMD ./wait-for-it/wait-for-it.sh mysql:3306 -- sh -c "node ./build/commands.js system:migrate:latest && node ./build/commands.js tenants:migrate:latest" diff --git a/docker/migration/start.sh b/docker/migration/start.sh deleted file mode 100644 index 5fa9f0c28..000000000 --- a/docker/migration/start.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Migrate the master system database. -./wait-for-it/wait-for-it.sh mysql:3306 -- node ./build/commands.js system:migrate:latest - -# Migrate all tenants. -./wait-for-it/wait-for-it.sh mysql:3306 -- node ./build/commands.js tenants:migrate:latest \ No newline at end of file