Fix: add output standalone to next.config.ts for Docker build
This commit is contained in:
1 parent
72775500da
commit
5c14645900
2 files changed
+10
-111
No files matched your search
+9
-110
@@ -1,126 +1,25 @@
|
||||
# ============================================================
|
||||
# HelpDesk ICHN - Docker Compose Principal
|
||||
# Caddy + Backend .NET 10 + Frontend Next.js 15 + PG + Redis
|
||||
# HelpDesk ICHN - Frontend Docker Compose
|
||||
# Solo Frontend Next.js (backend compartido en SAM)
|
||||
# ============================================================
|
||||
|
||||
networks:
|
||||
helpdesk-net:
|
||||
name: helpdesk-net
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
pgdata-helpdesk:
|
||||
redis-data:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
|
||||
services:
|
||||
# =============================================
|
||||
# GATEWAY - Caddy Reverse Proxy
|
||||
# =============================================
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
container_name: helpdesk-caddy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8443:443"
|
||||
volumes:
|
||||
- ./gateway/Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- ./gateway/certs:/certs:ro
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
networks:
|
||||
- helpdesk-net
|
||||
|
||||
# =============================================
|
||||
# BACKEND - .NET 10 (HelpDesk.API)
|
||||
# =============================================
|
||||
api:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: helpdesk-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
ASPNETCORE_URLS: http://+:5000
|
||||
DB_CONNECTION: Host=helpdesk-postgres;Database=helpdesk;Username=helpdesk;Password=${PG_PASSWORD:-helpdesk_pass}
|
||||
JWT_SECRET: ${JWT_SECRET:-your-super-secret-key-change-in-production-2024}
|
||||
JWT_ISSUER: HelpDeskICHH
|
||||
JWT_AUDIENCE: HelpDeskICHH
|
||||
JWT_EXPIRY_MINUTES: "480"
|
||||
FrontendUrl: http://localhost:3000
|
||||
networks:
|
||||
- helpdesk-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pgrep -x dotnet || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
# =============================================
|
||||
# FRONTEND - Next.js 15
|
||||
# =============================================
|
||||
frontend:
|
||||
helpdesk-frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: helpdesk-frontend
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: http://localhost:5000
|
||||
NEXT_PUBLIC_API_URL: https://api.ichn.local
|
||||
networks:
|
||||
- helpdesk-net
|
||||
- sam-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:3000 || exit 1"]
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
|
||||
# =============================================
|
||||
# DATABASE - PostgreSQL 16
|
||||
# =============================================
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: helpdesk-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: helpdesk
|
||||
POSTGRES_USER: helpdesk
|
||||
POSTGRES_PASSWORD: ${PG_PASSWORD:-helpdesk_pass}
|
||||
volumes:
|
||||
- pgdata-helpdesk:/var/lib/postgresql/data
|
||||
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
|
||||
ports:
|
||||
- "5433:5432"
|
||||
networks:
|
||||
- helpdesk-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U helpdesk -d helpdesk"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# =============================================
|
||||
# CACHE - Redis 7
|
||||
# =============================================
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: helpdesk-redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
ports:
|
||||
- "6381:6379"
|
||||
networks:
|
||||
- helpdesk-net
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
sam-net:
|
||||
external: true
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
output: "standalone",
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in new issue
Block a user