Compare commits

...
3 Commits
Author SHA1 Message Date
lingkai5wu 20864fd260 style: standardize NGINX_ENVSUBST_FILTER quotes 2026-10-16 15:16:47 +08:00
lingkai5wu f2beb701e6 chore: pin Nginx images 2026-10-16 15:11:20 +08:00
lingkai5wu 6e02bd39ae fix: harden container privileges 2026-10-16 15:11:17 +08:00
11 changed files with 53 additions and 2 deletions

No files matched your search

+2
View File
@@ -13,6 +13,8 @@ services:
networks:
- proxy
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
+12
View File
@@ -20,6 +20,18 @@ services:
networks:
- proxy
restart: unless-stopped
security_opt:
- no-new-privileges:true
# Root keeps only the capabilities restic needs to read and restore
# files owned by other users.
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_OVERRIDE
- DAC_READ_SEARCH
- FOWNER
- FSETID
deploy:
resources:
limits:
+2
View File
@@ -68,6 +68,8 @@ docker_args=(
run
--rm
--network "container:$CONTAINER"
--cap-drop ALL
--security-opt no-new-privileges:true
--cap-add NET_RAW
--cap-add NET_ADMIN
)
+2
View File
@@ -7,6 +7,8 @@ services:
- /srv/data/ddns-go:/root
network_mode: host
restart: always
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
+2
View File
@@ -13,6 +13,8 @@ services:
networks:
- proxy
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
+2
View File
@@ -11,6 +11,8 @@ services:
TZ: Asia/Shanghai
network_mode: host
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
+17
View File
@@ -21,6 +21,8 @@ services:
- default
- proxy
restart: unless-stopped
security_opt:
- no-new-privileges:true
healthcheck:
disable: false
deploy:
@@ -41,6 +43,10 @@ services:
env_file:
- .env
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
healthcheck:
disable: false
deploy:
@@ -61,6 +67,8 @@ services:
ports:
- "127.0.0.1:5432:5432"
restart: unless-stopped
security_opt:
- no-new-privileges:true
healthcheck:
disable: false
deploy:
@@ -76,6 +84,15 @@ services:
image: docker.io/valkey/valkey:9@sha256:c123e3715db63d06d4ad6964884037aa0d5d4d703939b9929954112889708e1d
container_name: immich-redis
restart: unless-stopped
security_opt:
- no-new-privileges:true
# The official image starts as root and drops to the valkey user.
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
healthcheck:
test: redis-cli ping || exit 1
deploy:
+6 -2
View File
@@ -1,7 +1,7 @@
name: nginx
services:
nginx:
image: nginx:1-alpine
image: nginx:1.31.7-alpine
container_name: nginx
volumes:
- /srv/data/nginx/templates:/etc/nginx/templates:ro
@@ -9,7 +9,7 @@ services:
environment:
BASE_DOMAIN: ${BASE_DOMAIN}
EO_ORIGIN_TOKEN: ${EO_ORIGIN_TOKEN}
NGINX_ENVSUBST_FILTER: '^(BASE_DOMAIN|EO_ORIGIN_TOKEN)$'
NGINX_ENVSUBST_FILTER: "^(BASE_DOMAIN|EO_ORIGIN_TOKEN)$"
NGINX_ENVSUBST_OUTPUT_DIR: /etc/nginx
ports:
- "192.168.10.101:80:80"
@@ -24,6 +24,8 @@ services:
extra_hosts:
- "host.internal:172.31.255.1"
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
@@ -44,6 +46,8 @@ services:
CF_Zone_ID: ${CF_ZONE_ID}
command: daemon
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
+4
View File
@@ -13,6 +13,10 @@ services:
networks:
- proxy
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
user: 1000:1000
deploy:
resources:
+2
View File
@@ -19,6 +19,8 @@ services:
networks:
- proxy
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
+2
View File
@@ -13,6 +13,8 @@ services:
ports:
- "192.168.10.101:445:445"
restart: always
security_opt:
- no-new-privileges:true
deploy:
resources:
limits: