mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-24 07:38:18 +02:00
Ensure application builds locally within Portainer, avoiding external image pulls
Configures Docker Compose to build the application image locally and prevents image downloads from Docker Hub. 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/e32734b8-3e86-4a0a-ad55-ba74cf7cf00c.jpg
This commit is contained in:
1 parent
d83e29270e
commit
f7661a418d
3 files changed
+63
-1
No files matched your search
@@ -0,0 +1,59 @@
|
|||||||
|
# Solution Finale pour Portainer
|
||||||
|
|
||||||
|
## Problème résolu
|
||||||
|
Le docker-compose.yml a été modifié pour forcer la construction locale et empêcher complètement le téléchargement d'images depuis Docker Hub.
|
||||||
|
|
||||||
|
## Modifications apportées
|
||||||
|
|
||||||
|
### 1. Suppression de la ligne `image:`
|
||||||
|
- Plus de référence à une image Docker Hub
|
||||||
|
- Force Portainer à construire localement
|
||||||
|
|
||||||
|
### 2. Ajout de `pull_policy: never`
|
||||||
|
- Empêche tout téléchargement d'image
|
||||||
|
- Force l'utilisation de la construction locale
|
||||||
|
|
||||||
|
### 3. Configuration de build explicite
|
||||||
|
```yaml
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: production
|
||||||
|
args:
|
||||||
|
- NODE_ENV=production
|
||||||
|
```
|
||||||
|
|
||||||
|
## Instructions Portainer
|
||||||
|
|
||||||
|
### Dans Portainer:
|
||||||
|
1. **Supprimez l'ancienne stack** si elle existe
|
||||||
|
2. **Créez une nouvelle stack** avec le nom "regisflow"
|
||||||
|
3. **Copiez le contenu** du docker-compose.yml modifié
|
||||||
|
4. **Déployez la stack**
|
||||||
|
|
||||||
|
### Portainer construira automatiquement:
|
||||||
|
- ✅ L'image sera construite depuis le code source
|
||||||
|
- ✅ Aucun téléchargement depuis Docker Hub
|
||||||
|
- ✅ Utilisation du réseau nginx_default
|
||||||
|
- ✅ Volumes persistants conservés
|
||||||
|
|
||||||
|
## Vérification
|
||||||
|
|
||||||
|
Après déploiement, vérifiez:
|
||||||
|
```bash
|
||||||
|
# Statut des conteneurs
|
||||||
|
docker ps | grep regisflow
|
||||||
|
|
||||||
|
# Logs de l'application
|
||||||
|
docker logs regisflow-app
|
||||||
|
|
||||||
|
# Test de l'application
|
||||||
|
curl http://localhost:5000/health
|
||||||
|
```
|
||||||
|
|
||||||
|
## Accès
|
||||||
|
- **URL**: http://votre-serveur:5000
|
||||||
|
- **Login**: admin / admin123
|
||||||
|
- **PostgreSQL**: Port 5433
|
||||||
|
|
||||||
|
Cette configuration finale devrait résoudre définitivement le problème de téléchargement d'image dans Portainer.
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
+4
-1
@@ -27,12 +27,15 @@ services:
|
|||||||
regisflow:
|
regisflow:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
target: production
|
target: production
|
||||||
image: regisflow-regisflow:latest
|
args:
|
||||||
|
- NODE_ENV=production
|
||||||
container_name: regisflow-app
|
container_name: regisflow-app
|
||||||
depends_on:
|
depends_on:
|
||||||
regisflow-db:
|
regisflow-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
pull_policy: never
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
|
|||||||
Reference in new issue
Block a user