Skip to content

Commit

Permalink
Update backup and improve security
Browse files Browse the repository at this point in the history
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
  • Loading branch information
bensuperpc committed Sep 19, 2024
1 parent 9c9938b commit e0ce9cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
13 changes: 4 additions & 9 deletions infrastructure/caddy/docker-compose.caddy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@ services:
- infra-network
env_file:
- ./caddy/env/caddy.env
#read_only: true
security_opt:
- no-new-privileges:true
#cap_drop:
# - ALL
cap_add:
- NET_ADMIN
healthcheck:
test: pidof caddy || exit 1
interval: 120s
Expand All @@ -47,10 +42,10 @@ services:
volumes:
- caddy_backup:/mnt/restic
- caddy_data:/data:ro
networks:
- infra-network
security_opt:
- no-new-privileges:true
network_mode: none
cap_drop:
- NET_ADMIN
- NET_RAW

volumes:
caddy_data:
Expand Down
11 changes: 4 additions & 7 deletions infrastructure/main/docker-compose.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ services:
profiles:
- main_infrastructure
volumes:
- infrastructure_server_chown:/infrastructure_server:rw
- public_data:/infrastructure_server/public:rw
- private_data:/infrastructure_server/private:rw
- public_data:/public:rw
- private_data:/private:rw
read_only: true
security_opt:
- no-new-privileges:true
Expand All @@ -17,11 +16,9 @@ services:
- CHOWN
- DAC_OVERRIDE
# Fix root permissions on mounted volumes
command: chown -R ${PUID:-1000}:${PGID:-1000} /infrastructure_server
command: chown -R ${PUID:-1000}:${PGID:-1000} /public /privates

volumes:
infrastructure_server_chown:
name: infrastructure_server_chown
public_data:
name: public_data
private_data:
Expand All @@ -30,4 +27,4 @@ volumes:
networks:
infra-network:
driver: bridge
name: infra-network
name: infra-network
8 changes: 4 additions & 4 deletions infrastructure/wordpress/docker-compose.wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ services:
- wordpress_backup:/mnt/restic
- wordpress_db:/data/wordpress_db:ro
- wordpress:/data/wordpress:ro
networks:
- infra-network
security_opt:
- no-new-privileges:true
network_mode: none
cap_drop:
- NET_ADMIN
- NET_RAW

volumes:
wordpress_db:
Expand Down

0 comments on commit e0ce9cf

Please sign in to comment.