-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from govlt/setup-image
setup image
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 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,11 @@ | ||
FROM caddy:2.8 | ||
|
||
EXPOSE 80 | ||
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD wget -qO- http://127.0.0.1:80/health || exit 1 | ||
|
||
# Copy Caddyfile | ||
COPY ./caddy/Caddyfile /etc/caddy/Caddyfile | ||
|
||
# Copy built files from the build stage | ||
COPY ./tiles /srv/ |
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,27 @@ | ||
{ | ||
auto_https off | ||
|
||
servers { | ||
trusted_proxies static private_ranges | ||
} | ||
} | ||
|
||
:80 | ||
|
||
root * /srv | ||
|
||
handle /health { | ||
log_skip | ||
@goingDown vars {http.shutting_down} true | ||
respond @goingDown "Bye-bye in {http.time_until_shutdown}" 503 | ||
respond "OK" | ||
} | ||
|
||
try_files {path} {file} | ||
file_server | ||
|
||
header -Server | ||
|
||
handle_errors { | ||
header -Server | ||
} |