mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-11 17:29:48 +02:00
Fixes Docker deployment by building the image locally for Portainer
Updates docker-compose.yml to use a locally built image and adds DOCKER_DEPLOYMENT.md and build-docker.sh for deployment instructions, along with a backup JSON file. Replit-Commit-Author: Agent Replit-Commit-Session-Id: dec54137-d5a2-4406-8ad4-5f2f9fb110bf Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/e3dd27f7-eb05-4352-b834-bf06ef42f3b7.jpg
This commit is contained in:
1 parent
28ca128ab6
commit
d8e5af6c77
4 files changed
+308
-3
No files matched your search
@@ -0,0 +1,74 @@
|
|||||||
|
# Déploiement Docker pour RegisFlow
|
||||||
|
|
||||||
|
## Problème résolu : Image Docker manquante
|
||||||
|
|
||||||
|
### Le problème
|
||||||
|
Portainer essayait de télécharger une image `regisflow-regisflow:latest` qui n'existe pas sur Docker Hub.
|
||||||
|
|
||||||
|
### Solution
|
||||||
|
L'image doit être construite localement avant utilisation.
|
||||||
|
|
||||||
|
## Instructions de déploiement
|
||||||
|
|
||||||
|
### 1. Construction de l'image Docker
|
||||||
|
```bash
|
||||||
|
# Méthode 1: Utiliser le script automatique
|
||||||
|
./build-docker.sh
|
||||||
|
|
||||||
|
# Méthode 2: Construction manuelle
|
||||||
|
docker build -t regisflow:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Démarrage avec Docker Compose
|
||||||
|
```bash
|
||||||
|
# Démarrer tous les services
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
# Vérifier le statut
|
||||||
|
docker-compose ps
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Configuration dans Portainer
|
||||||
|
1. Utiliser le nom d'image : `regisflow:latest`
|
||||||
|
2. Ou utiliser la configuration Docker Compose existante
|
||||||
|
3. L'image sera trouvée localement après construction
|
||||||
|
|
||||||
|
## Vérification du déploiement
|
||||||
|
|
||||||
|
### Vérifier que l'image existe
|
||||||
|
```bash
|
||||||
|
docker images | grep regisflow
|
||||||
|
```
|
||||||
|
|
||||||
|
### Vérifier les logs
|
||||||
|
```bash
|
||||||
|
docker-compose logs -f regisflow
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tester la santé de l'application
|
||||||
|
```bash
|
||||||
|
curl http://localhost:5000/health
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes importantes
|
||||||
|
- L'image doit être construite sur le serveur de déploiement
|
||||||
|
- La base de données PostgreSQL est incluse dans la configuration
|
||||||
|
- Les volumes sont persistants pour les sauvegardes et données
|
||||||
|
- Le port 5000 est exposé pour l'application
|
||||||
|
- Le port 5433 est exposé pour PostgreSQL (pour éviter les conflits)
|
||||||
|
|
||||||
|
## Résolution des problèmes courants
|
||||||
|
|
||||||
|
### Si l'image n'est pas trouvée
|
||||||
|
1. Vérifier que l'image a été construite : `docker images`
|
||||||
|
2. Reconstruire si nécessaire : `docker build -t regisflow:latest .`
|
||||||
|
|
||||||
|
### Si le conteneur ne démarre pas
|
||||||
|
1. Vérifier les logs : `docker-compose logs regisflow`
|
||||||
|
2. Vérifier la connectivité réseau : `docker network ls`
|
||||||
|
3. Vérifier les variables d'environnement
|
||||||
|
|
||||||
|
### Si PostgreSQL ne se connecte pas
|
||||||
|
1. Vérifier que le conteneur DB est en cours d'exécution
|
||||||
|
2. Vérifier la variable DATABASE_URL
|
||||||
|
3. Attendre que le healthcheck PostgreSQL passe (30s)
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
{
|
||||||
|
"timestamp": "2025-07-10T10:00:00.591Z",
|
||||||
|
"version": "1.0",
|
||||||
|
"type": "automatic",
|
||||||
|
"data": {
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"username": "ff579",
|
||||||
|
"email": null,
|
||||||
|
"firstName": "",
|
||||||
|
"lastName": "",
|
||||||
|
"role": "employee",
|
||||||
|
"storeId": 2,
|
||||||
|
"isActive": true,
|
||||||
|
"createdAt": "2025-07-10T09:48:22.256Z",
|
||||||
|
"updatedAt": "2025-07-10T09:48:22.256Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"username": "ff292",
|
||||||
|
"email": null,
|
||||||
|
"firstName": "",
|
||||||
|
"lastName": "",
|
||||||
|
"role": "employee",
|
||||||
|
"storeId": 1,
|
||||||
|
"isActive": true,
|
||||||
|
"createdAt": "2025-07-10T09:48:06.549Z",
|
||||||
|
"updatedAt": "2025-07-10T09:48:06.549Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"username": "gael",
|
||||||
|
"email": null,
|
||||||
|
"firstName": "",
|
||||||
|
"lastName": "",
|
||||||
|
"role": "administrator",
|
||||||
|
"storeId": null,
|
||||||
|
"isActive": true,
|
||||||
|
"createdAt": "2025-07-10T08:47:04.063Z",
|
||||||
|
"updatedAt": "2025-07-10T08:47:04.063Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"username": "FFNANCY",
|
||||||
|
"email": "michaelschal@gmail.com",
|
||||||
|
"firstName": "",
|
||||||
|
"lastName": "",
|
||||||
|
"role": "manager",
|
||||||
|
"storeId": 1,
|
||||||
|
"isActive": true,
|
||||||
|
"createdAt": "2025-07-09T18:55:01.413Z",
|
||||||
|
"updatedAt": "2025-07-09T18:55:01.413Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"username": "admin",
|
||||||
|
"email": "michaelschal@ffest.fr",
|
||||||
|
"firstName": "Administrateur",
|
||||||
|
"lastName": "Principal",
|
||||||
|
"role": "admin",
|
||||||
|
"storeId": 1,
|
||||||
|
"isActive": true,
|
||||||
|
"createdAt": "2025-07-09T18:37:53.865Z",
|
||||||
|
"updatedAt": "2025-07-09T18:37:53.865Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stores": [
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "Houdemont",
|
||||||
|
"address": "",
|
||||||
|
"phone": "",
|
||||||
|
"email": "",
|
||||||
|
"isActive": true,
|
||||||
|
"createdAt": "2025-07-09T19:00:30.782Z",
|
||||||
|
"updatedAt": "2025-07-09T19:00:30.782Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Frouard",
|
||||||
|
"address": "À définir",
|
||||||
|
"phone": "",
|
||||||
|
"email": "",
|
||||||
|
"isActive": true,
|
||||||
|
"createdAt": "2025-07-09T18:37:53.432Z",
|
||||||
|
"updatedAt": "2025-07-09T18:37:53.432Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sales": [
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"storeId": 2,
|
||||||
|
"userId": 2,
|
||||||
|
"timestamp": "2025-07-09T19:16:46.797Z",
|
||||||
|
"vendeur": "Moi",
|
||||||
|
"typeArticle": "Fusée",
|
||||||
|
"categorie": "F2",
|
||||||
|
"quantite": 10,
|
||||||
|
"gencode": "3660092323745",
|
||||||
|
"nom": " ASSOCIATION GRAND AIR",
|
||||||
|
"prenom": "Anne-Laure",
|
||||||
|
"dateNaissance": "2025-06-03",
|
||||||
|
"lieuNaissance": "Bar le duc",
|
||||||
|
"modePaiement": "Espèce",
|
||||||
|
"typeIdentite": "Passeport",
|
||||||
|
"numeroIdentite": "qsdfqsdgc23445",
|
||||||
|
"autoriteDelivrance": "Frouard",
|
||||||
|
"dateDelivrance": "2025-07-01",
|
||||||
|
"photoRecto": null,
|
||||||
|
"photoVerso": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"storeId": 2,
|
||||||
|
"userId": 1,
|
||||||
|
"timestamp": "2025-07-09T19:07:15.650Z",
|
||||||
|
"vendeur": "Moi",
|
||||||
|
"typeArticle": "Pétard aérien",
|
||||||
|
"categorie": "F3",
|
||||||
|
"quantite": 1,
|
||||||
|
"gencode": "3660092323745",
|
||||||
|
"nom": "SCHAL",
|
||||||
|
"prenom": "Michaël",
|
||||||
|
"dateNaissance": "2025-07-02",
|
||||||
|
"lieuNaissance": "Bar le duc",
|
||||||
|
"modePaiement": "Espèce",
|
||||||
|
"typeIdentite": "CNI",
|
||||||
|
"numeroIdentite": "qsdfqsdgc23445",
|
||||||
|
"autoriteDelivrance": "Frouard",
|
||||||
|
"dateDelivrance": "2025-07-01",
|
||||||
|
"photoRecto": null,
|
||||||
|
"photoVerso": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"storeId": 2,
|
||||||
|
"userId": 1,
|
||||||
|
"timestamp": "2025-07-09T19:05:20.904Z",
|
||||||
|
"vendeur": "Moi",
|
||||||
|
"typeArticle": "Pétard aérien",
|
||||||
|
"categorie": "F3",
|
||||||
|
"quantite": 1,
|
||||||
|
"gencode": "3660092323745",
|
||||||
|
"nom": "SCHAL",
|
||||||
|
"prenom": "Michaël",
|
||||||
|
"dateNaissance": "2025-07-02",
|
||||||
|
"lieuNaissance": "Bar le duc",
|
||||||
|
"modePaiement": "Espèce",
|
||||||
|
"typeIdentite": "CNI",
|
||||||
|
"numeroIdentite": "qsdfqsdgc23445",
|
||||||
|
"autoriteDelivrance": "Frouard",
|
||||||
|
"dateDelivrance": "2025-07-01",
|
||||||
|
"photoRecto": null,
|
||||||
|
"photoVerso": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"storeId": 1,
|
||||||
|
"userId": 1,
|
||||||
|
"timestamp": "2025-07-10T00:08:19.097Z",
|
||||||
|
"vendeur": "Moi",
|
||||||
|
"typeArticle": "Chandelle romaine",
|
||||||
|
"categorie": "F2",
|
||||||
|
"quantite": 1,
|
||||||
|
"gencode": "3660092323745",
|
||||||
|
"nom": "SCHAL",
|
||||||
|
"prenom": "Anne-Laure",
|
||||||
|
"dateNaissance": "2018-02-10",
|
||||||
|
"lieuNaissance": "Bar le duc",
|
||||||
|
"modePaiement": "Espèce",
|
||||||
|
"typeIdentite": "Passeport",
|
||||||
|
"numeroIdentite": "qsdfqsdgc23445",
|
||||||
|
"autoriteDelivrance": "Frouard",
|
||||||
|
"dateDelivrance": "2025-07-01",
|
||||||
|
"photoRecto": null,
|
||||||
|
"photoVerso": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"storeId": 1,
|
||||||
|
"userId": 1,
|
||||||
|
"timestamp": "2025-07-09T19:11:36.505Z",
|
||||||
|
"vendeur": "Moi",
|
||||||
|
"typeArticle": "Batterie",
|
||||||
|
"categorie": "F3",
|
||||||
|
"quantite": 1,
|
||||||
|
"gencode": "3660092323745",
|
||||||
|
"nom": "SCHAL",
|
||||||
|
"prenom": "Michaël",
|
||||||
|
"dateNaissance": "2025-07-18",
|
||||||
|
"lieuNaissance": "Bar le duc",
|
||||||
|
"modePaiement": "Espèce",
|
||||||
|
"typeIdentite": "CNI",
|
||||||
|
"numeroIdentite": "qsdfqsdgc23445",
|
||||||
|
"autoriteDelivrance": "Frouard",
|
||||||
|
"dateDelivrance": "2025-07-01",
|
||||||
|
"photoRecto": null,
|
||||||
|
"photoVerso": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"totalUsers": 5,
|
||||||
|
"totalStores": 2,
|
||||||
|
"totalSales": 5,
|
||||||
|
"exportedBy": "system-auto-backup"
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script de construction Docker pour RegisFlow
|
||||||
|
# Ce script construit l'image Docker localement
|
||||||
|
|
||||||
|
echo "🔧 Construction de l'image Docker RegisFlow..."
|
||||||
|
|
||||||
|
# Arrêter les conteneurs existants
|
||||||
|
echo "🛑 Arrêt des conteneurs existants..."
|
||||||
|
docker-compose down
|
||||||
|
|
||||||
|
# Construire l'image avec un nom spécifique
|
||||||
|
echo "🏗️ Construction de l'image..."
|
||||||
|
docker build -t regisflow:latest .
|
||||||
|
|
||||||
|
# Vérifier que l'image a été construite
|
||||||
|
echo "📋 Vérification de l'image construite..."
|
||||||
|
docker images | grep regisflow
|
||||||
|
|
||||||
|
echo "✅ Image construite avec succès !"
|
||||||
|
echo "🐳 Vous pouvez maintenant utiliser 'regisflow:latest' dans Portainer"
|
||||||
|
echo ""
|
||||||
|
echo "Pour démarrer l'application :"
|
||||||
|
echo " docker-compose up -d"
|
||||||
+1
-3
@@ -25,9 +25,7 @@ services:
|
|||||||
|
|
||||||
# Application RegisFlow
|
# Application RegisFlow
|
||||||
regisflow:
|
regisflow:
|
||||||
build:
|
image: regisflow:latest
|
||||||
context: .
|
|
||||||
target: production
|
|
||||||
container_name: regisflow-app
|
container_name: regisflow-app
|
||||||
depends_on:
|
depends_on:
|
||||||
regisflow-db:
|
regisflow-db:
|
||||||
|
|||||||
Reference in new issue
Block a user