-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.https.yml
More file actions
50 lines (49 loc) · 2.28 KB
/
Copy pathdocker-compose.https.yml
File metadata and controls
50 lines (49 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Opt-in addition to the dev stack - NOT included in `spin up`/docker-compose.dev.yml's default
# services. Terminates TLS for a friendly local dev URL (https://coolify-full.localhost:8443)
# with a self-signed cert, reverse-proxying to the coolify app container. Kept separate rather
# than folded into the default stack because it's a personal convenience, not something every
# dev session needs running.
#
# One-time setup:
# ./docker/https-proxy/generate-cert.sh
# (Windows) add "127.0.0.1 coolify-full.localhost" is NOT needed - *.localhost resolves to
# loopback natively in modern browsers and Windows (RFC 6761), no hosts-file edit required.
#
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.https.yml up -d https-proxy
#
# Then visit https://coolify-full.localhost:8443 - the browser will show one "connection not
# private" warning on first visit (self-signed cert, not from a trusted CA); click through it
# once. See docs/command.md for the mixed-content caveat with Vite's dev-server assets.
services:
https-proxy:
image: nginx:1.27-alpine
container_name: coolify-https-proxy
restart: unless-stopped
volumes:
# Directory-to-directory mount, not a single-file mount - single-file bind mounts
# (e.g. the old ./nginx.conf:/etc/nginx/conf.d/default.conf) are the exact pattern
# that fails after a Docker Desktop/WSL2 restart with "not a directory: Are you
# trying to mount a directory onto a file?" (the source special file isn't ready
# yet when the mount is created). Confirmed 2026-08-15: this container sat crashed
# for 28 hours with that error, invisible because it has no healthcheck/autoheal
# label (unlike the `coolify` container's own instance of this same race - see
# docker-compose.dev.yml). Mounting the whole conf.d/ directory instead sidesteps
# the race entirely.
- ./docker/https-proxy/conf.d:/etc/nginx/conf.d:ro
- ./docker/https-proxy/certs:/etc/nginx/certs:ro
ports:
- "8443:443"
- "6443:6443"
healthcheck:
test: curl -skf https://127.0.0.1/login -o /dev/null || exit 1
interval: 5s
retries: 10
timeout: 15s
labels:
- autoheal=true
networks:
- coolify
depends_on:
- coolify
- soketi