This commit is contained in:
@@ -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 && \
|
||||
|
||||
Reference in New Issue
Block a user