refactor: backend port 8000 → 7000 pour eviter conflits applicatifs
CI / Lint & Format (push) Failing after 16s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 17s
CI / Docker Build (push) Has been skipped

- Dockerfile: EXPOSE + CMD uvicorn --port 7000
- app/config.py: PORT default 8000 → 7000
- nginx default.conf: 6x proxy_pass backend:8000 → backend:7000
- docker-compose.prod.yml: BACKEND_PORT default 8001 → 7000, internal 7000
- docker-compose.yml (dev): 8000:8000 → 7000:7000
- imago-admin/docker-compose.yml: VITE_API_BASE_URL + port mapping → 7000
- .env.example: BACKEND_PORT=8001 → 7000
- deploy.sh: defaults + invites port 8001 → 7000
This commit is contained in:
2026-08-06 11:40:18 -04:00
parent 707d1f274b
commit 90b94e653e
8 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -22,6 +22,6 @@ COPY . .
# Répertoires de données # Répertoires de données
RUN mkdir -p data/uploads data/thumbnails RUN mkdir -p data/uploads data/thumbnails
EXPOSE 8000 EXPOSE 7000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7000"]
+1 -1
View File
@@ -18,7 +18,7 @@ class Settings(BaseSettings):
# Serveur # Serveur
HOST: str = "0.0.0.0" HOST: str = "0.0.0.0"
PORT: int = 8000 PORT: int = 7000
# Base de données # Base de données
DATABASE_URL: str = "sqlite+aiosqlite:///./data/imago.db" DATABASE_URL: str = "sqlite+aiosqlite:///./data/imago.db"
+1 -1
View File
@@ -13,7 +13,7 @@ SECRET_KEY=changez-moi-par-une-valeur-longue-et-aleatoire
# ── Ports (exposés sur l'hôte) ─────────────────────────────── # ── Ports (exposés sur l'hôte) ───────────────────────────────
ADMIN_PORT=3001 ADMIN_PORT=3001
BACKEND_PORT=8001 BACKEND_PORT=7000
# ── Stockage ───────────────────────────────────────────────── # ── Stockage ─────────────────────────────────────────────────
# "local" = fichiers sur disque # "local" = fichiers sur disque
+1 -1
View File
@@ -15,7 +15,7 @@ services:
image: docker-registry.dev.home:5000/imago-backend:latest image: docker-registry.dev.home:5000/imago-backend:latest
user: "1000:1000" user: "1000:1000"
ports: ports:
- "${BACKEND_PORT:-8001}:8000" - "${BACKEND_PORT:-7000}:7000"
env_file: env_file:
- .env - .env
environment: environment:
+1 -1
View File
@@ -59,7 +59,7 @@ services:
context: .. context: ..
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- "8000:8000" - "7000:7000"
env_file: env_file:
- ../.env - ../.env
environment: environment:
+2 -2
View File
@@ -3,7 +3,7 @@ services:
build: build:
context: . context: .
args: args:
VITE_API_BASE_URL: http://localhost:8000 VITE_API_BASE_URL: http://localhost:7000
ports: ports:
- '3000:80' - '3000:80'
depends_on: depends_on:
@@ -14,7 +14,7 @@ services:
build: build:
context: .. context: ..
ports: ports:
- '8000:8000' - '7000:7000'
volumes: volumes:
- ../data:/app/data - ../data:/app/data
env_file: ../.env env_file: ../.env
+6 -6
View File
@@ -11,7 +11,7 @@ server {
# Proxy vers le backend pour les routes API (v1 et Admin) # Proxy vers le backend pour les routes API (v1 et Admin)
location /api/ { location /api/ {
proxy_pass http://backend:8000; proxy_pass http://backend:7000;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -20,7 +20,7 @@ server {
# Proxy pour les fichiers signés (thumbnails, downloads) # Proxy pour les fichiers signés (thumbnails, downloads)
location /files/ { location /files/ {
proxy_pass http://backend:8000; proxy_pass http://backend:7000;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -28,7 +28,7 @@ server {
} }
location /admin/api/ { location /admin/api/ {
proxy_pass http://backend:8000; proxy_pass http://backend:7000;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -36,18 +36,18 @@ server {
} }
location /ws/ { location /ws/ {
proxy_pass http://backend:8000; proxy_pass http://backend:7000;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
} }
location /health { location /health {
proxy_pass http://backend:8000; proxy_pass http://backend:7000;
} }
location /metrics { location /metrics {
proxy_pass http://backend:8000; proxy_pass http://backend:7000;
} }
# Cache agressif pour les assets buildés (hash dans le nom) # Cache agressif pour les assets buildés (hash dans le nom)
+2 -2
View File
@@ -84,7 +84,7 @@ configure_env() {
echo -e "${BOLD}── Application ──${NC}" echo -e "${BOLD}── Application ──${NC}"
ask "Nom de l'application [Imago]:"; read -r APP_NAME; APP_NAME="${APP_NAME:-Imago}" ask "Nom de l'application [Imago]:"; read -r APP_NAME; APP_NAME="${APP_NAME:-Imago}"
ask "Port admin UI [3001]:"; read -r ADMIN_PORT; ADMIN_PORT="${ADMIN_PORT:-3001}" ask "Port admin UI [3001]:"; read -r ADMIN_PORT; ADMIN_PORT="${ADMIN_PORT:-3001}"
ask "Port API backend [8001]:"; read -r BACKEND_PORT; BACKEND_PORT="${BACKEND_PORT:-8001}" ask "Port API backend [7000]:"; read -r BACKEND_PORT; BACKEND_PORT="${BACKEND_PORT:-7000}"
echo "" echo ""
# ── Section 2 : Stockage ─────────────────────────────── # ── Section 2 : Stockage ───────────────────────────────
@@ -409,7 +409,7 @@ show_urls() {
done < "$ENV_FILE" done < "$ENV_FILE"
fi fi
local admin_port="${ADMIN_PORT:-3001}" local admin_port="${ADMIN_PORT:-3001}"
local backend_port="${BACKEND_PORT:-8001}" local backend_port="${BACKEND_PORT:-7000}"
echo "" echo ""
echo -e "${BOLD}${GREEN}╔══════════════════════════════════════════════════════════════╗${NC}" echo -e "${BOLD}${GREEN}╔══════════════════════════════════════════════════════════════╗${NC}"