diff --git a/docker-compose.yml b/docker-compose.yml index c124977..c74744d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,10 +28,12 @@ services: - history-api-project migrate: - image: migrate/migrate + build: + context: . + dockerfile_inline: | + FROM migrate/migrate + COPY db/migrations /migrations container_name: history_migrate - volumes: - - ./db/migrations:/migrations:ro depends_on: db: condition: service_healthy @@ -44,8 +46,6 @@ services: DB_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable" echo "Running migrations..." - # We skip the 'version' check loop because 'depends_on' - # with 'service_healthy' already handles the wait. /migrate -path /migrations -database "$$DB_URL" up networks: - history-api-project