Compare commits

...

8 Commits

Author SHA1 Message Date
Julien Froidefond
7852dad403 chore: format spacing in docker-compose.yml for improved readability
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m8s
2025-12-17 12:55:57 +01:00
Julien Froidefond
0742aae92f chore: update docker-compose.yml to allow dynamic initialization SQL file path
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 5s
2025-12-17 12:52:53 +01:00
Julien Froidefond
87a24d7ebf chore: optimize dependency installation in Dockerfile using pnpm cache
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m55s
2025-12-13 12:14:20 +01:00
Julien Froidefond
fea940df5f fix: update next and address vulnerabilities
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 20s
2025-12-13 07:26:59 +01:00
Julien Froidefond
3999446509 chore: update DB_HOST in docker-compose.yml to use peakskills-postgres
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 16s
2025-12-11 12:54:36 +01:00
Julien Froidefond
ee83efc317 chore: add public directory to Dockerfile and include .gitkeep for tracking
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m48s
2025-12-11 12:33:03 +01:00
Julien Froidefond
ad7d03ebef chore: add Watchtower label to prevent automatic updates in docker-compose.yml
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 1m40s
2025-12-11 12:11:35 +01:00
Julien Froidefond
bd6f071620 chore: rename services in docker-compose.yml for clarity and update environment variable handling
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 2m32s
2025-12-11 12:03:48 +01:00
6 changed files with 69 additions and 41 deletions

View File

@@ -0,0 +1,23 @@
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 }}
INIT_SQL: ${{ vars.INIT_SQL }}
run: |
docker compose up -d --build

View File

@@ -9,8 +9,9 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
# Copie des fichiers de dépendances # Copie des fichiers de dépendances
COPY package.json pnpm-lock.yaml ./ COPY package.json pnpm-lock.yaml ./
# Installation des dépendances # Installation des dépendances avec cache du store pnpm
RUN pnpm install --frozen-lockfile RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile
# Copie du code source # Copie du code source
COPY . . COPY . .
@@ -30,12 +31,14 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
# Copie des dépendances de production # Copie des dépendances de production
COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./ COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile --prod
# Copie des fichiers nécessaires depuis le stage de build # Copie des fichiers nécessaires depuis le stage de build
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next COPY --from=builder /app/.next ./.next
COPY --from=builder /app/next.config.mjs ./ COPY --from=builder /app/next.config.mjs ./
# Copie du dossier public (créé avec .gitkeep pour être tracké)
COPY --from=builder /app/public ./public
# Exposition du port # Exposition du port
EXPOSE 3000 EXPOSE 3000

View File

@@ -1,28 +1,30 @@
version: "3.8" version: "3.8"
services: services:
app: peakskills-app:
build: . build: .
ports: ports:
- "3008:3000" - "3008:3000"
environment: environment:
NODE_ENV: production NODE_ENV: production
DB_HOST: postgres DB_HOST: peakskills-postgres
DB_PORT: 5432 DB_PORT: 5432
DB_NAME: peakskills DB_NAME: peakskills
DB_USER: peakskills_user DB_USER: peakskills_user
DB_PASSWORD: peakskills_password DB_PASSWORD: peakskills_password
NEXT_PUBLIC_API_URL: "" NEXT_PUBLIC_API_URL: ""
# Auth.js configuration # Auth.js configuration
AUTH_SECRET: "FvhDat3sJK5TI1L4fcugCGFmLsO1BCi+mwSYeLkl8JA=" AUTH_SECRET: ${AUTH_SECRET:-FvhDat3sJK5TI1L4fcugCGFmLsO1BCi+mwSYeLkl8JA=}
AUTH_TRUST_HOST: "true" AUTH_TRUST_HOST: "true"
AUTH_URL: "http://localhost:3000" AUTH_URL: ${AUTH_URL:-http://localhost:3008}
depends_on: depends_on:
postgres: peakskills-postgres:
condition: service_healthy condition: service_healthy
restart: unless-stopped restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=false"
postgres: peakskills-postgres:
image: postgres:15 image: postgres:15
environment: environment:
POSTGRES_DB: peakskills POSTGRES_DB: peakskills
@@ -32,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
@@ -40,16 +42,16 @@ services:
retries: 5 retries: 5
# Adminer - Interface web pour PostgreSQL # Adminer - Interface web pour PostgreSQL
adminer: # peakskills-adminer:
image: adminer:4.8.1 # image: adminer:4.8.1
restart: always # restart: always
ports: # ports:
- "8080:8080" # - "8080:8080"
environment: # environment:
ADMINER_DEFAULT_SERVER: postgres # ADMINER_DEFAULT_SERVER: postgres
ADMINER_DESIGN: pepa-linha-dark # ADMINER_DESIGN: pepa-linha-dark
depends_on: # depends_on:
- postgres # - peakskills-postgres
volumes: volumes:
postgres_data: postgres_data:

View File

@@ -61,7 +61,7 @@
"geist": "^1.3.1", "geist": "^1.3.1",
"input-otp": "1.4.1", "input-otp": "1.4.1",
"lucide-react": "^0.454.0", "lucide-react": "^0.454.0",
"next": "15.5.7", "next": "15.5.9",
"next-auth": "5.0.0-beta.29", "next-auth": "5.0.0-beta.29",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"pg": "^8.12.0", "pg": "^8.12.0",

38
pnpm-lock.yaml generated
View File

@@ -139,7 +139,7 @@ importers:
version: 8.5.1(react@19.1.1) version: 8.5.1(react@19.1.1)
geist: geist:
specifier: ^1.3.1 specifier: ^1.3.1
version: 1.4.2(next@15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) version: 1.4.2(next@15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1))
input-otp: input-otp:
specifier: 1.4.1 specifier: 1.4.1
version: 1.4.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) version: 1.4.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
@@ -147,11 +147,11 @@ importers:
specifier: ^0.454.0 specifier: ^0.454.0
version: 0.454.0(react@19.1.1) version: 0.454.0(react@19.1.1)
next: next:
specifier: 15.5.7 specifier: 15.5.9
version: 15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) version: 15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
next-auth: next-auth:
specifier: 5.0.0-beta.29 specifier: 5.0.0-beta.29
version: 5.0.0-beta.29(next@15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) version: 5.0.0-beta.29(next@15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)
next-themes: next-themes:
specifier: ^0.4.6 specifier: ^0.4.6
version: 0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1) version: 0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
@@ -605,8 +605,8 @@ packages:
'@jridgewell/trace-mapping@0.3.30': '@jridgewell/trace-mapping@0.3.30':
resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==} resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==}
'@next/env@15.5.7': '@next/env@15.5.9':
resolution: {integrity: sha512-4h6Y2NyEkIEN7Z8YxkA27pq6zTkS09bUSYC0xjd0NpwFxjnIKeZEeH591o5WECSmjpUhLn3H2QLJcDye3Uzcvg==} resolution: {integrity: sha512-4GlTZ+EJM7WaW2HEZcyU317tIQDjkQIyENDLxYJfSWlfqguN+dHkZgyQTV/7ykvobU7yEH5gKvreNrH4B6QgIg==}
'@next/swc-darwin-arm64@15.5.7': '@next/swc-darwin-arm64@15.5.7':
resolution: {integrity: sha512-IZwtxCEpI91HVU/rAUOOobWSZv4P2DeTtNaCdHqLcTJU4wdNXgAySvKa/qJCgR5m6KI8UsKDXtO2B31jcaw1Yw==} resolution: {integrity: sha512-IZwtxCEpI91HVU/rAUOOobWSZv4P2DeTtNaCdHqLcTJU4wdNXgAySvKa/qJCgR5m6KI8UsKDXtO2B31jcaw1Yw==}
@@ -1481,8 +1481,8 @@ packages:
caniuse-lite@1.0.30001735: caniuse-lite@1.0.30001735:
resolution: {integrity: sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==} resolution: {integrity: sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==}
caniuse-lite@1.0.30001759: caniuse-lite@1.0.30001760:
resolution: {integrity: sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw==} resolution: {integrity: sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==}
chownr@3.0.0: chownr@3.0.0:
resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}
@@ -1772,8 +1772,8 @@ packages:
react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
next@15.5.7: next@15.5.9:
resolution: {integrity: sha512-+t2/0jIJ48kUpGKkdlhgkv+zPTEOoXyr60qXe68eB/pl3CMJaLeIGjzp5D6Oqt25hCBiBTt8wEeeAzfJvUKnPQ==} resolution: {integrity: sha512-agNLK89seZEtC5zUHwtut0+tNrc0Xw4FT/Dg+B/VLEo9pAcS9rtTKpek3V6kVcVwsB2YlqMaHdfZL4eLEVYuCg==}
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@@ -2369,7 +2369,7 @@ snapshots:
'@jridgewell/resolve-uri': 3.1.2 '@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/sourcemap-codec': 1.5.5
'@next/env@15.5.7': {} '@next/env@15.5.9': {}
'@next/swc-darwin-arm64@15.5.7': '@next/swc-darwin-arm64@15.5.7':
optional: true optional: true
@@ -3245,7 +3245,7 @@ snapshots:
caniuse-lite@1.0.30001735: {} caniuse-lite@1.0.30001735: {}
caniuse-lite@1.0.30001759: {} caniuse-lite@1.0.30001760: {}
chownr@3.0.0: {} chownr@3.0.0: {}
@@ -3386,9 +3386,9 @@ snapshots:
fsevents@2.3.3: fsevents@2.3.3:
optional: true optional: true
geist@1.4.2(next@15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)): geist@1.4.2(next@15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1)):
dependencies: dependencies:
next: 15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) next: 15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
get-nonce@1.0.1: {} get-nonce@1.0.1: {}
@@ -3480,10 +3480,10 @@ snapshots:
nanoid@3.3.11: {} nanoid@3.3.11: {}
next-auth@5.0.0-beta.29(next@15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): next-auth@5.0.0-beta.29(next@15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1):
dependencies: dependencies:
'@auth/core': 0.40.0 '@auth/core': 0.40.0
next: 15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) next: 15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
react: 19.1.1 react: 19.1.1
next-themes@0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1): next-themes@0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1):
@@ -3491,11 +3491,11 @@ snapshots:
react: 19.1.1 react: 19.1.1
react-dom: 19.1.1(react@19.1.1) react-dom: 19.1.1(react@19.1.1)
next@15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1): next@15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1):
dependencies: dependencies:
'@next/env': 15.5.7 '@next/env': 15.5.9
'@swc/helpers': 0.5.15 '@swc/helpers': 0.5.15
caniuse-lite: 1.0.30001759 caniuse-lite: 1.0.30001760
postcss: 8.4.31 postcss: 8.4.31
react: 19.1.1 react: 19.1.1
react-dom: 19.1.1(react@19.1.1) react-dom: 19.1.1(react@19.1.1)

0
public/.gitkeep Normal file
View File