Update docker-compose.yml
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user