-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added caddy setup for with or without SSL
- Loading branch information
1 parent
de2cb6b
commit 779a9c0
Showing
5 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
(plane_proxy) { | ||
request_body { | ||
max_size {$FILE_SIZE_LIMIT} | ||
} | ||
|
||
reverse_proxy /spaces/* space:3000 | ||
|
||
reverse_proxy /god-mode/* admin:3000 | ||
|
||
reverse_proxy /api/* api:8000 | ||
|
||
reverse_proxy /auth/* api:8000 | ||
|
||
reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000 | ||
|
||
reverse_proxy /* web:3000 | ||
} | ||
|
||
{ | ||
email {$CERT_EMAIL:admin@example.com} | ||
acme_ca {$CERT_ACME_CA} | ||
{$CERT_ACME_DNS} | ||
servers { | ||
max_header_size 5MB | ||
client_ip_headers X-Forwarded-For X-Real-IP | ||
trusted_proxies static {$TRUSTED_PROXIES:0.0.0.0/0} | ||
} | ||
} | ||
|
||
{$SITE_ADDRESS} { | ||
import plane_proxy | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM makeplane/caddy:latest | ||
|
||
COPY ./Caddyfile.template /etc/caddy/Caddyfile | ||
|
||
COPY ./caddy.sh /docker-entrypoint.sh | ||
|
||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
CMD ["/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
export SITE_ADDRESS=$(if [ "$SSL" = "true" ]; then echo "${APP_DOMAIN}"; else echo "http://${APP_DOMAIN}"; fi) | ||
exec caddy run --config /etc/caddy/Caddyfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters