-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support ssl on local with self signed url #2903
base: dev
Are you sure you want to change the base?
Changes from 3 commits
935a373
0ede17a
ffb1857
0d52d86
932029c
371b73f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
myapp.local { | ||
|
||
reverse_proxy http://host.docker.internal:3000 | ||
tls internal | ||
} | ||
|
||
backoffice.local { | ||
reverse_proxy http://host.docker.internal:5137 | ||
root * /srv | ||
try_files {path} /index.html | ||
file_server | ||
tls internal | ||
} | ||
|
||
workflow.local { | ||
|
||
|
||
reverse_proxy http://host.docker.internal:5200 | ||
tls internal | ||
} | ||
|
||
kyb.local { | ||
reverse_proxy http://host.docker.internal:5201 | ||
tls internal | ||
} | ||
|
||
kyc.local { | ||
reverse_proxy http://host.docker.internal:5202 | ||
tls internal | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,20 @@ | ||||||
version: '3' | ||||||
services: | ||||||
caddy: | ||||||
image: caddy:latest | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid using 'latest' tag for Caddy image. Using the - image: caddy:latest
+ image: caddy:2.7.6 📝 Committable suggestion
Suggested change
|
||||||
container_name: caddy_server | ||||||
ports: | ||||||
- '443:443' # Expose HTTPS | ||||||
- '80:80' # Expose HTTP (optional, redirects to HTTPS) | ||||||
volumes: | ||||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro # Mount the Caddyfile | ||||||
- caddy_data:/data # Persist Caddy data | ||||||
- caddy_config:/config | ||||||
extra_hosts: | ||||||
- myapp.local:host-gateway | ||||||
- backoffice.local:host-gateway | ||||||
- host.docker.internal:host-gateway | ||||||
|
||||||
server: | ||||||
build: | ||||||
context: . | ||||||
|
@@ -63,3 +78,9 @@ services: | |||||
retries: 10 | ||||||
volumes: | ||||||
postgres15: ~ | ||||||
caddy_config: | ||||||
caddy_data: | ||||||
networks: | ||||||
mynetwork: | ||||||
external: true | ||||||
name: host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add security headers and CORS configuration.
While the basic reverse proxy setup works, consider enhancing security by adding standard security headers and CORS configurations for local development. This will better mirror production security requirements.
Add these configurations to each domain block:
Also applies to: 7-10, 12-17, 19-22, 24-27