diff --git a/docker-compose.yml b/docker-compose.yml index 32aed88..67c1f62 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,14 +36,12 @@ services: env_file: - ./assets/resources/.env volumes: - # Sử dụng đường dẫn tuyệt đối biến docker tự hiểu hoặc đảm bảo folder tồn tại - - ./db/migrations:/migrations:ro + - ${PWD}/db/migrations:/migrations:ro entrypoint: - sh - -c - | DB_URL="postgres://$${POSTGRES_USER}:$${POSTGRES_PASSWORD}@db:5432/$${POSTGRES_DB}?sslmode=disable" - # Thêm ls để debug xem có file không nếu vẫn lỗi ls /migrations /migrate -path /migrations -database "$$DB_URL" up || \ (/migrate -path /migrations -database "$$DB_URL" force 8 && \