Skip to content

Commit

Permalink
Merge pull request #18 from coreruleset/feat/activate-rules
Browse files Browse the repository at this point in the history
feat: add script for rules activation
  • Loading branch information
fzipi authored Aug 17, 2024
2 parents a55e0cf + f10b82c commit a7f2d83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions caddy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ COPY --from=builder-caddy /usr/bin/caddy /usr/bin/caddy
# Copy out Coraza configuration files and rules from builder-caddy
COPY --from=builder-crs /opt/coraza /opt/coraza

# Copy rules activation script
COPY src/bin/activate-rules.sh /opt/coraza/activate-rules.sh

# Add user to run Caddy so it is not running as root
# This should only be done if the Caddy user/group is not set to root
# hadolint ignore=DL3018,SC1075
Expand Down
3 changes: 3 additions & 0 deletions caddy/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ else
echo " - Done"
fi

# Activating CRS rules
. /opt/coraza/activate-rules.sh

# Launch Caddy
echo "Launching $*"
exec "$@"

0 comments on commit a7f2d83

Please sign in to comment.