From bd6f0716209cc0048f1b13217494b0485a2fe150 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Thu, 11 Dec 2025 12:03:48 +0100 Subject: [PATCH] chore: rename services in docker-compose.yml for clarity and update environment variable handling --- .gitea/workflows/deploy.yml | 22 ++++++++++++++++++++++ docker-compose.yml | 30 +++++++++++++++--------------- 2 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..6a9ee28 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy with Docker Compose + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: mac-orbstack-runner + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Deploy stack + env: + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 + AUTH_SECRET: ${{ secrets.AUTH_SECRET }} + AUTH_URL: ${{ vars.AUTH_URL }} + run: | + docker compose up -d diff --git a/docker-compose.yml b/docker-compose.yml index 0d98dbe..329f846 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.8" services: - app: + peakskills-app: build: . ports: - "3008:3000" @@ -14,15 +14,15 @@ services: DB_PASSWORD: peakskills_password NEXT_PUBLIC_API_URL: "" # Auth.js configuration - AUTH_SECRET: "FvhDat3sJK5TI1L4fcugCGFmLsO1BCi+mwSYeLkl8JA=" + AUTH_SECRET: ${AUTH_SECRET:-FvhDat3sJK5TI1L4fcugCGFmLsO1BCi+mwSYeLkl8JA=} AUTH_TRUST_HOST: "true" - AUTH_URL: "http://localhost:3000" + AUTH_URL: ${AUTH_URL:-http://localhost:3008} depends_on: - postgres: + peakskills-postgres: condition: service_healthy restart: unless-stopped - postgres: + peakskills-postgres: image: postgres:15 environment: POSTGRES_DB: peakskills @@ -40,16 +40,16 @@ services: retries: 5 # Adminer - Interface web pour PostgreSQL - adminer: - image: adminer:4.8.1 - restart: always - ports: - - "8080:8080" - environment: - ADMINER_DEFAULT_SERVER: postgres - ADMINER_DESIGN: pepa-linha-dark - depends_on: - - postgres + # peakskills-adminer: + # image: adminer:4.8.1 + # restart: always + # ports: + # - "8080:8080" + # environment: + # ADMINER_DEFAULT_SERVER: postgres + # ADMINER_DESIGN: pepa-linha-dark + # depends_on: + # - peakskills-postgres volumes: postgres_data: