dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Error when upgrading existing composes

Open tpraxedes opened this issue 1 year ago • 3 comments

To Reproduce

My actual compose file has a few volumes, dokploy updates the volumes names for it's pattern, but dokploy is failing to replace all entries in docker-compose file, generating erros for undefined volumes

My compose file for tests:

version: '3'

x-base-config: &base-config image: chatwoot/chatwoot:latest volumes: - chatwoot-storage:/app/storage networks: - dokploy-network environment: - FRONTEND_URL=${FRONTEND_URL} - SECRET_KEY_BASE=${SECRET_KEY_BASE} - RAILS_ENV=${RAILS_ENV} - NODE_ENV=${NODE_ENV} - INSTALLATION_ENV=${INSTALLATION_ENV} - RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT} - LOG_LEVEL=${LOG_LEVEL} - DEFAULT_LOCALE=${DEFAULT_LOCALE} - POSTGRES_HOST=${POSTGRES_HOST} - POSTGRES_PORT=${POSTGRES_PORT} - POSTGRES_DATABASE=${POSTGRES_DATABASE} - POSTGRES_USERNAME=${POSTGRES_USERNAME} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - REDIS_URL=${REDIS_URL} - ENABLE_ACCOUNT_SIGNUP=${ENABLE_ACCOUNT_SIGNUP} - ACTIVE_STORAGE_SERVICE=${ACTIVE_STORAGE_SERVICE} - SMTP_ADDRESS=${SMTP_ADDRESS} - SMTP_PORT=${SMTP_PORT} - SMTP_USERNAME=${SMTP_USERNAME} - SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_AUTHENTICATION=login - SMTP_ENABLE_STARTTLS_AUTO=${SMTP_ENABLE_STARTTLS_AUTO} - MAILER_SENDER_EMAIL=${MAILER_SENDER_EMAIL} - MAILER_SUPPORT_EMAIL=${MAILER_SUPPORT_EMAIL} - ACTIVE_STORAGE_SERVICE=s3_compatible - STORAGE_BUCKET_NAME=${STORAGE_BUCKET_NAME} - STORAGE_ACCESS_KEY_ID=${STORAGE_ACCESS_KEY_ID} - STORAGE_SECRET_ACCESS_KEY=${STORAGE_SECRET_ACCESS_KEY} - STORAGE_REGION=${STORAGE_REGION} - STORAGE_ENDPOINT=${STORAGE_ENDPOINT} - STORAGE_FORCE_PATH_STYLE=${STORAGE_FORCE_PATH_STYLE}

services: chatwoot-rails: <<: *base-config depends_on: chatwoot-postgres: condition: service_started chatwoot-redis: condition: service_started entrypoint: docker/entrypoints/rails.sh command: ['bundle', 'exec', 'sh', '-c', 'rails db:chatwoot_prepare && rails s -p 3000 -b 0.0.0.0'] restart: always

chatwoot-sidekiq: <<: *base-config depends_on: chatwoot-postgres: condition: service_started chatwoot-redis: condition: service_started command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml'] restart: always

chatwoot-postgres: image: pgvector/pgvector:pg14 restart: always volumes: - chatwoot-postgres-data:/var/lib/postgresql/data - ./init-vector.sql:/docker-entrypoint-initdb.d/init-vector.sql environment: - POSTGRES_DB=${POSTGRES_DATABASE} - POSTGRES_USER=${POSTGRES_USERNAME} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}

chatwoot-redis: image: redis:alpine restart: always volumes: - chatwoot-redis-data:/data

networks: dokploy-network: external: true

volumes: chatwoot-storage: chatwoot-postgres-data: chatwoot-redis-data:

Current vs. Expected behavior

Update docker compose on dokploy ui and deploy its

Provide environment information

Operating System:
  OS: Ubuntu 24.04.3 LTS (GNU/Linux 6.14.0-1012-oracle aarch64)
  Arch: arm64
Dokploy version: 0.25.4
VPS Provider: Oracle Cloud (OCI)
Application: Chatwoot

Which area(s) are affected? (Select all that apply)

Docker Compose

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

I eddited the file directly on folder: /etc/dokploy/compose/teste-chatwoot-g9hjcr/code

When changed every entry of the unedited docker volume name, it worked

Will you send a PR to fix it?

Maybe, need help

tpraxedes avatar Oct 02 '25 23:10 tpraxedes

have the exact same issue on chatwoot deployment, any updates?

azraelx23 avatar Oct 09 '25 00:10 azraelx23

What do you mean by dokploy updating the pattern? dokploy uses something called project_names https://docs.docker.com/reference/cli/docker/compose/#use--p-to-specify-a-project-name which helps maintain a unique ID. We don't modify or add prefixes to the volumes; Docker does this when you specify that flag. This helps us control logs, monitoring, and many other things.

I didn't quite understand the issue. What do you mean by "upgrade"? Could you provide a concise set of steps?

Siumauricio avatar Dec 07 '25 00:12 Siumauricio

I'll close this issue due to inactivity

Siumauricio avatar Feb 07 '26 04:02 Siumauricio