generated from 18F/open-source-policy
-
Notifications
You must be signed in to change notification settings - Fork 5
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 #70 from GSA-TTS/update-caddy
Update caddy to 2.8
- Loading branch information
Showing
5 changed files
with
8 additions
and
11 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
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Build the caddy binary and copy it into the proxy subdirectory | ||
caddy-v2-with-forwardproxy: Dockerfile proxy/Caddyfile | ||
docker compose build | ||
docker compose up -d | ||
docker compose cp caddy:/usr/bin/caddy proxy/caddy | ||
docker compose up -d | ||
- docker compose cp caddy:/usr/bin/caddy proxy/caddy | ||
docker compose down | ||
|
||
validate: | ||
echo "test.gov" > allow.acl | ||
echo "test.com" > deny.acl | ||
sed -i 's/tls cert.pem key.pem/# tls cert.pem key.pem/g' proxy/Caddyfile | ||
sed -i.bak 's/tls cert.pem key.pem/# tls cert.pem key.pem/g' proxy/Caddyfile && rm proxy/Caddyfile.bak | ||
PORT=9999 PROXY_USERNAME=admin PROXY_PASSWORD=pass PROXY_PORTS=443 ./proxy/caddy validate --config proxy/Caddyfile | ||
sed -i 's/# tls cert.pem key.pem/tls cert.pem key.pem/g' proxy/Caddyfile | ||
rm allow.acl deny.acl | ||
sed -i.bak 's/# tls cert.pem key.pem/tls cert.pem key.pem/g' proxy/Caddyfile | ||
rm proxy/Caddyfile.bak allow.acl deny.acl |
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
Binary file not shown.