From c61610a1ccd090e6f2b8dfd7c71ccace67e4bb65 Mon Sep 17 00:00:00 2001 From: Waqar Amin Date: Thu, 7 Dec 2023 04:25:17 +0500 Subject: [PATCH] Dockerfile removed from migration --- backend/Migrations/Dockerfile | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 backend/Migrations/Dockerfile diff --git a/backend/Migrations/Dockerfile b/backend/Migrations/Dockerfile deleted file mode 100644 index 9c7503d6..00000000 --- a/backend/Migrations/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM golang:alpine - -WORKDIR /Migrate - -# Install curl and migrate tool -RUN apk add --no-cache curl && \ - curl -L https://github.com/golang-migrate/migrate/releases/download/v4.16.2/migrate.linux-amd64.tar.gz | tar xvz && \ - mv migrate.linux-amd64 migrate && \ - chmod +x migrate # Ensure the migrate binary is executable - -COPY 001_initial.down.sql 001_initial.up.sql ./ - -# Run down migration during the build process -RUN ./migrate -database "postgres://postgres:helloworld@db:5432/postgres?sslmode=disable" -path backend/Migrations/ down - -# Run up migration when the container starts -CMD ./migrate -database "postgres://postgres:helloworld@db:5432/postgres?sslmode=disable" -path backend/Migrations/ up