Skip to content

Commit 8105846

Browse files
authored
Merge pull request #3326 from tairan/fix/selinux-bind-mount-labels
fix(deploy): add :Z SELinux labels to bind mounts in compose files
2 parents f079742 + 3164036 commit 8105846

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

deploy/docker-compose.dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
ports:
1919
- "${BIND_HOST:-127.0.0.1}:${SERVER_PORT:-8080}:8080"
2020
volumes:
21-
- ./data:/app/data
21+
- ./data:/app/data:Z
2222
environment:
2323
- AUTO_SETUP=true
2424
- SERVER_HOST=0.0.0.0
@@ -73,7 +73,7 @@ services:
7373
container_name: sub2api-postgres-dev
7474
restart: unless-stopped
7575
volumes:
76-
- ./postgres_data:/var/lib/postgresql/data
76+
- ./postgres_data:/var/lib/postgresql/data:Z
7777
environment:
7878
- POSTGRES_USER=${POSTGRES_USER:-sub2api}
7979
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
@@ -94,7 +94,7 @@ services:
9494
container_name: sub2api-redis-dev
9595
restart: unless-stopped
9696
volumes:
97-
- ./redis_data:/data
97+
- ./redis_data:/data:Z
9898
command: >
9999
sh -c '
100100
redis-server

deploy/docker-compose.local.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ services:
3535
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080"
3636
volumes:
3737
# Local directory mapping for easy migration
38-
- ./data:/app/data
38+
- ./data:/app/data:Z
3939
# Optional: Mount custom config.yaml (uncomment and create the file first)
4040
# Copy config.example.yaml to config.yaml, modify it, then uncomment:
4141
# - ./config.yaml:/app/data/config.yaml
@@ -192,7 +192,7 @@ services:
192192
hard: 100000
193193
volumes:
194194
# Local directory mapping for easy migration
195-
- ./postgres_data:/var/lib/postgresql/data
195+
- ./postgres_data:/var/lib/postgresql/data:Z
196196
environment:
197197
- POSTGRES_USER=${POSTGRES_USER:-sub2api}
198198
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
@@ -223,7 +223,7 @@ services:
223223
hard: 100000
224224
volumes:
225225
# Local directory mapping for easy migration
226-
- ./redis_data:/data
226+
- ./redis_data:/data:Z
227227
command: >
228228
sh -c '
229229
redis-server

0 commit comments

Comments
 (0)