coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
34.44k stars 1.87k forks source link

[Bug]: Old container versions after compose update #4248

Open KaelWD opened 3 days ago

KaelWD commented 3 days ago

Error Message and Logs

After updating image versions in a non-git compose resource, the old versions are still displayed as "exited" in the services list and their settings are not persisted to the new versions. The resource status shows as degraded because of the exited services.

Steps to Reproduce

  1. Deploy this
    services:
    swetrix:
    image: 'swetrix/swetrix-fe:v3.2.0'
    restart: unless-stopped
    depends_on:
      - swetrix-api
    environment:
      - 'API_URL=${SERVICE_SWETRIX_API_URL}'
    healthcheck:
      test: 'wget --spider http://localhost:3000/ping'
      interval: 30s
      start_period: 15s
    swetrix-api:
    image: 'swetrix/swetrix-api:v3.3.0'
    restart: unless-stopped
    container_name: swetrix-api
    environment:
      - 'JWT_ACCESS_TOKEN_SECRET=${JWT_ACCESS_TOKEN_SECRET}'
      - 'JWT_REFRESH_TOKEN_SECRET=${JWT_REFRESH_TOKEN_SECRET}'
      - REDIS_HOST=redis
      - 'CLICKHOUSE_HOST=http://clickhouse'
      - API_ORIGINS
      - 'EMAIL=${EMAIL}'
      - 'PASSWORD=${PASSWORD}'
      - API_KEY
      - DEBUG_MODE=false
      - CLOUDFLARE_PROXY_ENABLED=false
      - IS_PRIMARY_NODE=true
    links:
      - redis
      - clickhouse
    depends_on:
      - redis
      - clickhouse
    healthcheck:
      test: 'wget --spider http://localhost:5005/ping'
      interval: 30s
      start_period: 15s
    redis:
    image: 'redis:7.2-alpine'
    restart: unless-stopped
    environment:
      - REDIS_PORT=6379
      - REDIS_USER=default
      - REDIS_PASSWORD
    healthcheck:
      test: 'redis-cli ping | grep PONG'
      interval: 30s
      start_period: 1m
    clickhouse:
    image: 'clickhouse/clickhouse-server:24.8-alpine'
    container_name: clickhouse
    cap_add:
      - SYS_NICE
    environment:
      - CLICKHOUSE_DATABASE=analytics
      - CLICKHOUSE_USER=default
      - CLICKHOUSE_PORT=8123
      - CLICKHOUSE_PASSWORD
    restart: unless-stopped
    volumes:
      - 'swetrix-events-data:/var/lib/clickhouse'
    healthcheck:
      test: 'wget --spider http://127.0.0.1:8123/ping'
      interval: 30s
      start_period: 1m
    ulimits:
      nofile:
        soft: 262144
        hard: 262144
    volumes:
    swetrix-events-data:
    driver: local
  2. Set a domain for the swetrix container (https://swetrix.example.com:3000)
  3. Change swetrix-fe to 3.3.0 and clickhouse to 24.10 and restart

Example Repository URL

No response

Coolify Version

v4.0.0-beta.364

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04.1

Additional Information

The non-database services can be deleted and the config manually re-applied, clickhouse does not have a delete button though.

djsisson commented 3 days ago

You will need to click settings and delete on old versions, if it's not possible to delete u can tick exclude from service check

KaelWD commented 3 days ago

Yeah I've done that, it shouldn't be necessary though.