chore: update docker-compose.yml to allow dynamic initialization SQL file path
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 5s

This commit is contained in:
Julien Froidefond
2025-12-17 12:52:53 +01:00
parent 87a24d7ebf
commit 0742aae92f
2 changed files with 2 additions and 1 deletions

View File

@@ -18,5 +18,6 @@ jobs:
COMPOSE_DOCKER_CLI_BUILD: 1 COMPOSE_DOCKER_CLI_BUILD: 1
AUTH_SECRET: ${{ secrets.AUTH_SECRET }} AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
AUTH_URL: ${{ vars.AUTH_URL }} AUTH_URL: ${{ vars.AUTH_URL }}
INIT_SQL: ${{ vars.INIT_SQL }}
run: | run: |
docker compose up -d --build docker compose up -d --build

View File

@@ -34,7 +34,7 @@ services:
- "5432:5432" - "5432:5432"
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql -${INIT_SQL:-./scripts/init.sql}:/docker-entrypoint-initdb.d/init.sql
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U peakskills_user -d peakskills"] test: ["CMD-SHELL", "pg_isready -U peakskills_user -d peakskills"]
interval: 10s interval: 10s