Compare commits
8 Commits
3fd3e165e2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7852dad403 | ||
|
|
0742aae92f | ||
|
|
87a24d7ebf | ||
|
|
fea940df5f | ||
|
|
3999446509 | ||
|
|
ee83efc317 | ||
|
|
ad7d03ebef | ||
|
|
bd6f071620 |
23
.gitea/workflows/deploy.yml
Normal file
23
.gitea/workflows/deploy.yml
Normal 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
|
||||
11
Dockerfile
11
Dockerfile
@@ -9,8 +9,9 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
# Copie des fichiers de dépendances
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# Installation des dépendances
|
||||
RUN pnpm install --frozen-lockfile
|
||||
# Installation des dépendances avec cache du store pnpm
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
# Copie du code source
|
||||
COPY . .
|
||||
@@ -30,12 +31,14 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
# Copie des dépendances de production
|
||||
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
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next ./.next
|
||||
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
|
||||
EXPOSE 3000
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
peakskills-app:
|
||||
build: .
|
||||
ports:
|
||||
- "3008:3000"
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DB_HOST: postgres
|
||||
DB_HOST: peakskills-postgres
|
||||
DB_PORT: 5432
|
||||
DB_NAME: peakskills
|
||||
DB_USER: peakskills_user
|
||||
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
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=false"
|
||||
|
||||
postgres:
|
||||
peakskills-postgres:
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_DB: peakskills
|
||||
@@ -32,7 +34,7 @@ services:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- 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:
|
||||
test: ["CMD-SHELL", "pg_isready -U peakskills_user -d peakskills"]
|
||||
interval: 10s
|
||||
@@ -40,16 +42,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:
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"geist": "^1.3.1",
|
||||
"input-otp": "1.4.1",
|
||||
"lucide-react": "^0.454.0",
|
||||
"next": "15.5.7",
|
||||
"next": "15.5.9",
|
||||
"next-auth": "5.0.0-beta.29",
|
||||
"next-themes": "^0.4.6",
|
||||
"pg": "^8.12.0",
|
||||
|
||||
38
pnpm-lock.yaml
generated
38
pnpm-lock.yaml
generated
@@ -139,7 +139,7 @@ importers:
|
||||
version: 8.5.1(react@19.1.1)
|
||||
geist:
|
||||
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:
|
||||
specifier: 1.4.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
|
||||
version: 0.454.0(react@19.1.1)
|
||||
next:
|
||||
specifier: 15.5.7
|
||||
version: 15.5.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
|
||||
specifier: 15.5.9
|
||||
version: 15.5.9(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
|
||||
next-auth:
|
||||
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:
|
||||
specifier: ^0.4.6
|
||||
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':
|
||||
resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==}
|
||||
|
||||
'@next/env@15.5.7':
|
||||
resolution: {integrity: sha512-4h6Y2NyEkIEN7Z8YxkA27pq6zTkS09bUSYC0xjd0NpwFxjnIKeZEeH591o5WECSmjpUhLn3H2QLJcDye3Uzcvg==}
|
||||
'@next/env@15.5.9':
|
||||
resolution: {integrity: sha512-4GlTZ+EJM7WaW2HEZcyU317tIQDjkQIyENDLxYJfSWlfqguN+dHkZgyQTV/7ykvobU7yEH5gKvreNrH4B6QgIg==}
|
||||
|
||||
'@next/swc-darwin-arm64@15.5.7':
|
||||
resolution: {integrity: sha512-IZwtxCEpI91HVU/rAUOOobWSZv4P2DeTtNaCdHqLcTJU4wdNXgAySvKa/qJCgR5m6KI8UsKDXtO2B31jcaw1Yw==}
|
||||
@@ -1481,8 +1481,8 @@ packages:
|
||||
caniuse-lite@1.0.30001735:
|
||||
resolution: {integrity: sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==}
|
||||
|
||||
caniuse-lite@1.0.30001759:
|
||||
resolution: {integrity: sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw==}
|
||||
caniuse-lite@1.0.30001760:
|
||||
resolution: {integrity: sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==}
|
||||
|
||||
chownr@3.0.0:
|
||||
resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}
|
||||
@@ -1772,8 +1772,8 @@ packages:
|
||||
react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
|
||||
react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
|
||||
|
||||
next@15.5.7:
|
||||
resolution: {integrity: sha512-+t2/0jIJ48kUpGKkdlhgkv+zPTEOoXyr60qXe68eB/pl3CMJaLeIGjzp5D6Oqt25hCBiBTt8wEeeAzfJvUKnPQ==}
|
||||
next@15.5.9:
|
||||
resolution: {integrity: sha512-agNLK89seZEtC5zUHwtut0+tNrc0Xw4FT/Dg+B/VLEo9pAcS9rtTKpek3V6kVcVwsB2YlqMaHdfZL4eLEVYuCg==}
|
||||
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -2369,7 +2369,7 @@ snapshots:
|
||||
'@jridgewell/resolve-uri': 3.1.2
|
||||
'@jridgewell/sourcemap-codec': 1.5.5
|
||||
|
||||
'@next/env@15.5.7': {}
|
||||
'@next/env@15.5.9': {}
|
||||
|
||||
'@next/swc-darwin-arm64@15.5.7':
|
||||
optional: true
|
||||
@@ -3245,7 +3245,7 @@ snapshots:
|
||||
|
||||
caniuse-lite@1.0.30001735: {}
|
||||
|
||||
caniuse-lite@1.0.30001759: {}
|
||||
caniuse-lite@1.0.30001760: {}
|
||||
|
||||
chownr@3.0.0: {}
|
||||
|
||||
@@ -3386,9 +3386,9 @@ snapshots:
|
||||
fsevents@2.3.3:
|
||||
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:
|
||||
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: {}
|
||||
|
||||
@@ -3480,10 +3480,10 @@ snapshots:
|
||||
|
||||
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:
|
||||
'@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
|
||||
|
||||
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-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:
|
||||
'@next/env': 15.5.7
|
||||
'@next/env': 15.5.9
|
||||
'@swc/helpers': 0.5.15
|
||||
caniuse-lite: 1.0.30001759
|
||||
caniuse-lite: 1.0.30001760
|
||||
postcss: 8.4.31
|
||||
react: 19.1.1
|
||||
react-dom: 19.1.1(react@19.1.1)
|
||||
|
||||
0
public/.gitkeep
Normal file
0
public/.gitkeep
Normal file
Reference in New Issue
Block a user