fix: add named volumes for storage, postgres, and redis (#11465)

This PR updates docker-compose.production.yaml to simplify volume
management and eliminate host-path mounts that were causing permission
and startup errors.
This commit is contained in:
Tanmay Deep Sharma
2025-05-12 19:02:12 +07:00
committed by GitHub
parent 142bae5fa4
commit d14505d464

View File

@@ -5,7 +5,7 @@ services:
image: chatwoot/chatwoot:latest
env_file: .env ## Change this file for customized env variables
volumes:
- /data/storage:/app/storage
- storage_data:/app/storage
rails:
<<: *base
@@ -40,7 +40,7 @@ services:
ports:
- '127.0.0.1:5432:5432'
volumes:
- /data/postgres:/var/lib/postgresql/data
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=chatwoot
- POSTGRES_USER=postgres
@@ -53,6 +53,11 @@ services:
command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""]
env_file: .env
volumes:
- /data/redis:/data
- redis_data:/data
ports:
- '127.0.0.1:6379:6379'
volumes:
storage_data:
postgres_data:
redis_data: