Compare commits
4 Commits
55e91cdfc9
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bba0e175a2 | ||
|
|
325a0f82ae | ||
|
|
6afe340cce | ||
|
|
6f73a3951e |
26
.gitea/workflows/validate.yml
Normal file
26
.gitea/workflows/validate.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Validation applicative
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- "docs/**"
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
name: Build backend et frontend
|
||||
runs-on: ci-node22
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Récupérer les sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Installer et build backend
|
||||
run: cd backend && npm install --ignore-scripts && npm run build
|
||||
|
||||
- name: Installer et build frontend
|
||||
run: cd frontend && npm install --ignore-scripts && npm run build
|
||||
5
app.json
5
app.json
@@ -9,5 +9,8 @@
|
||||
"containerName": "santinova-facturation-app",
|
||||
"image": "images/facturation.png",
|
||||
"giteaRepo": "facturation-santinova",
|
||||
"giteaOwner": "manus-admin"
|
||||
"giteaOwner": "manus-admin",
|
||||
"ci": {
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,12 +13,10 @@ services:
|
||||
MYSQL_DATABASE: facturation_santinova
|
||||
MYSQL_CHARACTER_SET_SERVER: utf8mb4
|
||||
MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci
|
||||
ports:
|
||||
- "${DB_PORT:-3306}:3306"
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
networks:
|
||||
- santinova-network
|
||||
- web
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_ROOT_PASSWORD:-santinova_db_pass}"]
|
||||
interval: 10s
|
||||
@@ -41,17 +39,23 @@ services:
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3001
|
||||
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@db:3306/facturation_santinova
|
||||
# Le réseau web est partagé par plusieurs projets : ne jamais utiliser l’alias générique `db`.
|
||||
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@santinova-facturation-db:3306/facturation_santinova
|
||||
JWT_SECRET: ${JWT_SECRET:-santinova-jwt-secret-change-in-production}
|
||||
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-24h}
|
||||
UPLOAD_DIR: /app/uploads
|
||||
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:3001"
|
||||
volumes:
|
||||
- uploads_data:/app/uploads
|
||||
networks:
|
||||
- santinova-network
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=web"
|
||||
- "traefik.http.routers.facturation-santinova.rule=Host(`facturation.recette.santinova-soft.org`)"
|
||||
- "traefik.http.routers.facturation-santinova.entrypoints=websecure"
|
||||
- "traefik.http.routers.facturation-santinova.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.facturation-santinova.loadbalancer.server.port=3001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3001/api/health"]
|
||||
interval: 30s
|
||||
@@ -71,9 +75,9 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@db:3306/facturation_santinova
|
||||
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@santinova-facturation-db:3306/facturation_santinova
|
||||
networks:
|
||||
- santinova-network
|
||||
- web
|
||||
restart: "no"
|
||||
|
||||
volumes:
|
||||
@@ -83,5 +87,5 @@ volumes:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
santinova-network:
|
||||
driver: bridge
|
||||
web:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user