56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./project/backend/
|
|
dockerfile: DockerfileGTF.backend
|
|
ports:
|
|
- "8000:3000" # ✅ Backend accessible sur https://mygtf.ensup-adm.net:8000
|
|
env_file:
|
|
- ./project/backend/config/.env
|
|
extra_hosts:
|
|
- "BONEMINE:192.168.0.3"
|
|
- "bonemine.ensup.local:192.168.0.3"
|
|
networks:
|
|
- gtf-network # ✅ Ajouté
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./project
|
|
dockerfile: DockerfileGTF.frontend
|
|
ports:
|
|
- "3001:3001"
|
|
volumes:
|
|
- C:\Users\oimer\.aspnet\https:/https:ro
|
|
environment:
|
|
- ASPNETCORE_URLS=https://+:3001;http://+:3001
|
|
- ASPNETCORE_Kestrel__Certificates__Default__Password=tGTF2025
|
|
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
|
|
- VITE_API_URL=https://mygtf.ensup-adm.net:8000 # ✅ Ajouté - URL de l'API
|
|
depends_on:
|
|
- backend # ✅ Ajouté
|
|
networks:
|
|
- gtf-network # ✅ Ajouté
|
|
restart: unless-stopped
|
|
|
|
# ✅ NOUVEAU : Nginx en reverse proxy (RECOMMANDÉ)
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "443:443"
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- C:\Users\oimer\.aspnet\https:/etc/nginx/ssl:ro
|
|
depends_on:
|
|
- frontend
|
|
- backend
|
|
networks:
|
|
- gtf-network
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
gtf-network:
|
|
driver: bridge |