feature/ci-deploy #2

Merged
vincent merged 5 commits from feature/ci-deploy into dev 2026-03-21 17:11:17 +00:00
6 changed files with 7233 additions and 11 deletions

View File

@@ -17,15 +17,25 @@ jobs:
id: env id: env
run: | run: |
if [ "${{ github.ref_name }}" = "main" ]; then if [ "${{ github.ref_name }}" = "main" ]; then
echo "ENV=prod" >> $GITHUB_OUTPUT
echo "COMPOSE_FILE=docker/docker-compose.prod.yml" >> $GITHUB_OUTPUT echo "COMPOSE_FILE=docker/docker-compose.prod.yml" >> $GITHUB_OUTPUT
echo "PROJECT_PATH=/volume1/docker/auditshield-prod" >> $GITHUB_OUTPUT
else else
echo "ENV=dev" >> $GITHUB_OUTPUT
echo "COMPOSE_FILE=docker/docker-compose.yml" >> $GITHUB_OUTPUT echo "COMPOSE_FILE=docker/docker-compose.yml" >> $GITHUB_OUTPUT
echo "PROJECT_PATH=/volume1/docker/auditshield-dev" >> $GITHUB_OUTPUT
fi fi
- name: Deploy - name: Deploy to NAS
run: | uses: appleboy/ssh-action@v1
docker compose -f ${{ steps.env.outputs.COMPOSE_FILE }} pull with:
docker compose -f ${{ steps.env.outputs.COMPOSE_FILE }} up -d --remove-orphans host: ${{ secrets.NAS_HOST }}
docker image prune -f username: ${{ secrets.NAS_USER }}
key: ${{ secrets.NAS_SSH_KEY }}
script: |
mkdir -p ${{ steps.env.outputs.PROJECT_PATH }}
cd ${{ steps.env.outputs.PROJECT_PATH }}
git clone https://gitea.rigolet.tech/vincent/auditshield.git . 2>/dev/null || git pull
cp .env.example .env 2>/dev/null || true
sudo docker compose -f ${{ steps.env.outputs.COMPOSE_FILE }} up -d --build --remove-orphans
sudo docker image prune -f

5
frontend/next-env.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@@ -1,6 +1,5 @@
import type { NextConfig } from "next"; /** @type {import('next').NextConfig} */
const nextConfig = {
const nextConfig: NextConfig = {
output: "standalone", output: "standalone",
async rewrites() { async rewrites() {
return [ return [

7209
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,6 @@
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"@radix-ui/react-avatar": "^1.0.4", "@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-badge": "^1.0.0",
"@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-label": "^2.0.2", "@radix-ui/react-label": "^2.0.2",

0
frontend/public/.gitkeep Normal file
View File