S
Supanote
Sign in Sign up

Docker Compose Next.js Stack with Caddy Auto-SSL

plain (yaml) 13 hours ago · 39 lines · 6 views
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.

Share Note

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

Report this note

Notification