S
Supanote
Sign in Sign up

Docker Compose Next.js Stack with Caddy Auto-SSL

plain (yaml) 1 month ago · 39 lines · 242 views
Verified Blueprint Caddy

Containerized Next.js production deployment with Caddy reverse proxy providing automatic Let's Encrypt certificates.

Quick Fetch
1version: '3.8'
2
3services:
4 caddy:
5 image: caddy:2-alpine
6 restart: unless-stopped
7 ports:
8 - "80:80"
9 - "443:443"
10 volumes:
11 - ./Caddyfile:/etc/caddy/Caddyfile:ro
12 - caddy_data:/data
13 - caddy_config:/config
14 depends_on:
15 - web
16 networks:
17 - app_network
19 web:
20 build:
21 context: .
22 dockerfile: Dockerfile
23 restart: unless-stopped
24 environment:
25 - NODE_ENV=production
26 - PORT=3000
27 expose:
28 - "3000"
29 networks:
30 - app_network
32volumes:
33 caddy_data:
34 caddy_config:
36networks:
37 app_network:
38 driver: bridge

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Related Caddy & DevOps & Infrastructure Blueprints

Production-ready configurations and diagnostics from the verified Supanote library.

All DevOps & Infrastructure →
Interactive Developer Workbench: Nginx Access & Error Log Analyzer

Parse Nginx combined access logs and upstream error traces instantly with HTTP status colorizing and secret scanning.

Open Nginx Log Analyzer →

Share Note

Open
Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification