Modify deployed files location | Adapt Caddy templaate to new structure

This commit is contained in:
2025-02-07 13:10:04 -03:00
parent cfed9f4fc0
commit 46ba00f623
3 changed files with 6 additions and 9 deletions

View File

@@ -21,13 +21,7 @@
# Example: Static file server
# static.example.com {
# coraza_waf {
# directives `
# Include /etc/caddy/coraza.conf
# `
# }
#
# root * /src/static/test
# root * /srv/static/test
# file_server
# }

View File

@@ -23,7 +23,7 @@ services:
environment:
- CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
volumes:
- ../static:/src/static # Your static files location
- ../../deploy:/srv/static # Your static files location
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/coraza/coraza.conf:/etc/caddy/coraza.conf
- ./caddy/logs:/var/log/caddy

View File

@@ -17,8 +17,11 @@ function create_deploy_user() {
sudo usermod -aG docker $username
echo "[ USER ]: User added to the following groupps (www-data, docker)"
echo "[ USER ]: Creating deploy folders under /home/$username"
sudo mkdir -p /home/$username/static
sudo mkdir -p /home/$username/apps
echo "[ USER ]: Setting ownership of /home/$username folder"
sudo chown -R $username:$username /home/$username
echo "[ USER ]: User setup finished"
}