From 2e2966c7e5e5a98f28d87531e443d47f62a34032 Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Sun, 9 Mar 2025 00:17:06 +0000 Subject: [PATCH] Update docker-compose.yml --- docker-compose.yml | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 28c678c..b6eb5ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,23 +1,7 @@ -version: '3.8' +version: '3' services: - # Next.js Application Service - nextjs: - image: your-nextjs-image # Replace this with your custom Next.js Docker image - container_name: nextjs_app - build: . - environment: - - NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api - ports: - - "3000:3000" # Expose port 3000 for the Next.js application - labels: - - "traefik.enable=true" - - "traefik.http.routers.nextjs.rule=Host(`dash.embermarket.app`)" # Replace with your domain - - "traefik.http.services.nextjs.loadbalancer.server.port=3000" # Expose Next.js on port 3000 - networks: - - web - - # Traefik Reverse Proxy Service + # Traefik reverse proxy traefik: image: traefik:v2.5 container_name: traefik @@ -38,6 +22,19 @@ services: labels: - "traefik.enable=true" -networks: - web: - external: true + # Next.js application + nextjs-app: + build: + context: . + dockerfile: Dockerfile + container_name: nextjs-app-container + expose: + - "3000" # Expose Next.js app inside the Docker network + environment: + - NODE_ENV=production + - NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api + labels: + - "traefik.enable=true" + - "traefik.http.routers.dashboard.rule=Host(`dash.embermarket.app`)" # Use AEZA as reverse proxy + - "traefik.http.services.dashboard.loadbalancer.server.port=3000" + restart: unless-stopped