DevOps Tool

Docker Compose

Choose the stack the same way as in the Nginx tool: Next.js or Django. The result is docker-compose and .dockerignore for that stack.

Short note in the blog

Tech Stack
docker-compose.yml
# your.domain -> 127.0.0.1:3000
services:
  web:
    build: .
    container_name: your-domain
    restart: unless-stopped
    ports:
      - "127.0.0.1:3000:3000"
    env_file:
      - .env
    environment:
      NODE_ENV: production
      PORT: "3000"
      HOSTNAME: "0.0.0.0"
.dockerignore
node_modules
.next
.git
.env
.env.*
npm-debug.log
Dockerfile
.dockerignore
README.md

What does this tool return?

The answer follows the stack. Next.js listens on port 3000 inside the container, and Django runs Gunicorn on 8000. The host port in compose is the one Nginx proxies for this domain.