ci(admin-web): Docker build & push vers registry Gitea + reusable tests
Some checks failed
CI / Detect Changes (pull_request) Successful in 3s
CI / YouTube Worker (pull_request) Failing after 6s
CI / Admin Web CI (pull_request) Failing after 7s
CI / Deploy (pull_request) Has been skipped
PR → Build → WiFi/USB Deploy → LGTM / Build & Deploy to iPhone (WiFi/USB) (pull_request) Failing after 2m54s
PR → Build → WiFi/USB Deploy → LGTM / Wait for LGTM comment (pull_request) Has been skipped
Some checks failed
CI / Detect Changes (pull_request) Successful in 3s
CI / YouTube Worker (pull_request) Failing after 6s
CI / Admin Web CI (pull_request) Failing after 7s
CI / Deploy (pull_request) Has been skipped
PR → Build → WiFi/USB Deploy → LGTM / Build & Deploy to iPhone (WiFi/USB) (pull_request) Failing after 2m54s
PR → Build → WiFi/USB Deploy → LGTM / Wait for LGTM comment (pull_request) Has been skipped
- Nouveau Dockerfile multi-stage Next.js standalone (node:22-bookworm-slim) - Configuration semantic-release (.releaserc.json, version.json, devDeps) - docker-compose.portainer.yml pour déploiement Portainer - Workflow docker-admin-web.yml : test → semantic-release → build push → deploy - Extraction admin-web-tests.yml (reusable workflow) appelé par ci.yml et docker-admin-web.yml → 0 duplication - next.config.ts : ajout output: 'standalone' - .dockerignore : exclusions node_modules, .next, etc.
This commit is contained in:
12
admin-web/.dockerignore
Normal file
12
admin-web/.dockerignore
Normal file
@@ -0,0 +1,12 @@
|
||||
node_modules
|
||||
.next
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
.npm
|
||||
.pnp
|
||||
.DS_Store
|
||||
*.md
|
||||
coverage
|
||||
playwright-report
|
||||
test-results
|
||||
14
admin-web/.releaserc.json
Normal file
14
admin-web/.releaserc.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"branches": ["main"],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
["@semantic-release/exec", {
|
||||
"prepareCmd": "echo '{\"version\": \"${nextRelease.version}\"}' > version.json"
|
||||
}],
|
||||
["@semantic-release/git", {
|
||||
"assets": ["version.json"],
|
||||
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
|
||||
}]
|
||||
]
|
||||
}
|
||||
29
admin-web/Dockerfile
Normal file
29
admin-web/Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM node:22-bookworm-slim AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-bookworm-slim AS production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY --from=build /app/public ./public
|
||||
COPY --from=build /app/.next/standalone ./
|
||||
COPY --from=build /app/.next/static ./.next/static
|
||||
|
||||
RUN groupadd -g 1001 appgroup && useradd -u 1001 -g appgroup -s /bin/sh -M nodeuser
|
||||
|
||||
USER nodeuser
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["node", "server.js"]
|
||||
16
admin-web/docker-compose.portainer.yml
Normal file
16
admin-web/docker-compose.portainer.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
admin-web:
|
||||
image: gitea.1000co.fr/${DOCKER_USERNAME}/tabatago-admin-web:${VERSION:-latest}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL}
|
||||
- NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY}
|
||||
networks:
|
||||
- supabase_supabase-network
|
||||
|
||||
networks:
|
||||
supabase_supabase-network:
|
||||
external: true
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
output: 'standalone',
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
"test:e2e": "playwright test",
|
||||
"test:e2e:ui": "playwright test --ui",
|
||||
"test:e2e:headed": "playwright test --headed",
|
||||
"test:all": "npm run test && npm run test:e2e"
|
||||
"test:all": "npm run test && npm run test:e2e",
|
||||
"semantic-release": "semantic-release"
|
||||
},
|
||||
"dependencies": {
|
||||
"@google/genai": "^1.47.0",
|
||||
@@ -30,6 +31,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.58.2",
|
||||
"@semantic-release/commit-analyzer": "^13.0.0",
|
||||
"@semantic-release/exec": "^6.0.0",
|
||||
"@semantic-release/git": "^10.0.0",
|
||||
"@semantic-release/release-notes-generator": "^14.0.0",
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
"@testing-library/react": "^16.3.2",
|
||||
@@ -42,6 +47,7 @@
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "16.1.6",
|
||||
"jsdom": "^28.1.0",
|
||||
"semantic-release": "^24.0.0",
|
||||
"shadcn": "^3.8.5",
|
||||
"tailwindcss": "^4",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
|
||||
1
admin-web/version.json
Normal file
1
admin-web/version.json
Normal file
@@ -0,0 +1 @@
|
||||
{"version": "0.1.0"}
|
||||
Reference in New Issue
Block a user