Step 1 migration: add API service and dedicated PostgreSQL

This commit is contained in:
Ponte
2026-02-11 14:53:13 +01:00
parent 8e96541fb1
commit aae5471862
5 changed files with 92 additions and 1 deletions

View File

@@ -28,6 +28,8 @@ Centraliser ta collection dans une interface rapide a utiliser, evolutive, et fa
- Frontend: HTML, CSS, JavaScript vanilla
- Serveur web local: Nginx (conteneur Docker)
- Backend API: Node.js (endpoint de sante pour migration progressive)
- Base de donnees: PostgreSQL dediee a l'application
- Orchestration: Docker Compose
## Structure du projet
@@ -38,6 +40,9 @@ Centraliser ta collection dans une interface rapide a utiliser, evolutive, et fa
|- styles.css
|- app.js
|- Dockerfile
|- api/
| |- Dockerfile
| |- server.js
|- docker-compose.yml
|- .dockerignore
|- .env.example
@@ -57,6 +62,10 @@ Par defaut:
```env
APP_PORT=7001
API_PORT=7002
VG_DB_NAME=video_games
VG_DB_USER=video_games_user
VG_DB_PASSWORD=change_me
```
Tu peux mettre `7000` si ce port est libre sur ta machine.
@@ -72,6 +81,10 @@ docker compose up -d --build
- [http://localhost:7001](http://localhost:7001) (par defaut)
- ou [http://localhost:7000](http://localhost:7000) si `APP_PORT=7000`
### 3-bis) Verifier l'API (etape 1 migration)
- [http://localhost:7002/health](http://localhost:7002/health)
### 4) Arreter
```bash