mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: Update Chatwoot Compose
This commit is contained in:
@@ -1,6 +1,37 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:12
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=chatwoot_production
|
||||||
|
- POSTGRES_USER=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USERNAME}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
command: ["sh", "-c", "redis-server --requirepass \"${REDIS_PASSWORD}\""]
|
||||||
|
volumes:
|
||||||
|
- redis_data:/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
restart: always
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
image: chatwoot/chatwoot:v3.14.1
|
image: chatwoot/chatwoot:v3.14.1
|
||||||
networks:
|
networks:
|
||||||
@@ -23,23 +54,26 @@ services:
|
|||||||
- LOG_LEVEL=info
|
- LOG_LEVEL=info
|
||||||
- LOG_SIZE=500
|
- LOG_SIZE=500
|
||||||
- RAILS_MAX_THREADS=5
|
- RAILS_MAX_THREADS=5
|
||||||
command: bundle exec rails db:chatwoot_prepare
|
command: >
|
||||||
|
sh -c "
|
||||||
|
until PGPASSWORD=${POSTGRES_PASSWORD} psql -h postgres -U ${POSTGRES_USERNAME} -d chatwoot_production -c '\q'; do
|
||||||
|
echo 'Waiting for postgres...'
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo 'PostgreSQL is ready!'
|
||||||
|
bundle exec rails db:chatwoot_prepare
|
||||||
|
"
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
base: &base
|
|
||||||
image: chatwoot/chatwoot:v3.14.1
|
|
||||||
volumes:
|
|
||||||
- storage_data:/app/storage
|
|
||||||
networks:
|
|
||||||
- dokploy-network
|
|
||||||
|
|
||||||
rails:
|
rails:
|
||||||
<<: *base
|
<<: *base
|
||||||
depends_on:
|
depends_on:
|
||||||
|
setup:
|
||||||
|
condition: service_completed_successfully
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
@@ -109,37 +143,6 @@ services:
|
|||||||
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
|
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
postgres:
|
|
||||||
image: postgres:12
|
|
||||||
networks:
|
|
||||||
- dokploy-network
|
|
||||||
volumes:
|
|
||||||
- postgres_data:/var/lib/postgresql/data
|
|
||||||
environment:
|
|
||||||
- POSTGRES_DB=chatwoot_production
|
|
||||||
- POSTGRES_USER=${POSTGRES_USERNAME}
|
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USERNAME}"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:alpine
|
|
||||||
networks:
|
|
||||||
- dokploy-network
|
|
||||||
command: ["sh", "-c", "redis-server --requirepass \"${REDIS_PASSWORD}\""]
|
|
||||||
volumes:
|
|
||||||
- redis_data:/data
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
storage_data:
|
storage_data:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user