Skip to content

Commit

Permalink
Update config and add public caddy file browser
Browse files Browse the repository at this point in the history
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
  • Loading branch information
bensuperpc committed Sep 20, 2024
1 parent e0ce9cf commit 9700b8a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ And then, caddy will generate the certificate for you and renew it automatically
| [projectsend.bensuperpc.org](https://projectsend.bensuperpc.org) | Sub | ProjectSend for file sharing |
| [picoshare.bensuperpc.org](https://picoshare.bensuperpc.org) | Sub | Picoshare for file sharing |
| [dufs.bensuperpc.org](https://dufs.bensuperpc.org) | Sub | Dufs for file sharing |
| [public.bensuperpc.org](https://public.bensuperpc.org) | Sub | Caddy for file sharing |
| bensuperpc.com | Main | Redirect to www.bensuperpc.org |
| bensuperpc.fr | Main | Redirect to www.bensuperpc.org |
| bensuperpc.net | Main | Redirect to www.bensuperpc.org |
Expand Down
5 changes: 5 additions & 0 deletions infrastructure/caddy/config/bensuperpc.org/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ homepage.bensuperpc.org {
redir https://www.bensuperpc.org{uri} permanent
}

public.bensuperpc.org {
root * /public_data
file_server browse
}

wordpress.bensuperpc.org {
root * /var/www/html
php_fastcgi wordpress:9000
Expand Down
9 changes: 8 additions & 1 deletion infrastructure/caddy/docker-compose.caddy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ services:
- 80:80
- 443:443
volumes:
- wordpress:/var/www/html:rw
- caddy_data:/data:rw
- caddy_config:/config:rw
- ./caddy/config:/etc/caddy:ro
- wordpress:/var/www/html:rw
- public_data:/public_data:ro

networks:
- infra-network
env_file:
Expand Down Expand Up @@ -46,6 +48,7 @@ services:
cap_drop:
- NET_ADMIN
- NET_RAW
- SYS_ADMIN

volumes:
caddy_data:
Expand All @@ -54,3 +57,7 @@ volumes:
name: caddy_config
caddy_backup:
name: caddy_backup
wordpress:
name: wordpress
public_data:
name: public_data
6 changes: 6 additions & 0 deletions infrastructure/homepage/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
description: Dufs
ping: dufs.bensuperpc.org
container: dufs
- caddy:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/caddy.png
href: https://public.bensuperpc.org/
description: File browser
ping: public.bensuperpc.org
container: caddy

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

volumes:
public_data:
Expand All @@ -28,3 +28,7 @@ networks:
infra-network:
driver: bridge
name: infra-network
intern-network:
driver: bridge
internal: true
name: intern-network
1 change: 1 addition & 0 deletions infrastructure/wordpress/docker-compose.wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ services:
cap_drop:
- NET_ADMIN
- NET_RAW
- SYS_ADMIN

volumes:
wordpress_db:
Expand Down

0 comments on commit 9700b8a

Please sign in to comment.