From 4609940856fb258d7830f509827bdad5dcd57ee4 Mon Sep 17 00:00:00 2001 From: "reza.g" Date: Tue, 8 Sep 2026 19:51:55 +0330 Subject: [PATCH] fix(infra): make the Coolify compose file Linux-safe docker compose config absolutized bind mounts to the Windows dev path (C:\Users\Reza\Desktop\...), which cannot exist on the Linux Coolify server and broke parsing. Also normalized the expanded structures back to compact, Coolify-friendly syntax: - bind volume sources are now repo-relative (./sql/..., ./infra/...) - long-syntax volumes (type/source/target/volume objects) -> short 'src:target[:ro]' - long-syntax ports (mode:ingress/target/published/protocol objects) -> short 'host:container' strings - dropped the compose-generated top-level 'name:' key Verified: 'docker compose -f docker-compose.coolify.yml config' resolves hosts, TLS, and healthchecks with no warnings; minio-init's escaped shell variables ($${MINIO_*}) are preserved. --- docker-compose.coolify.yml | 74 ++++++++------------------------------ 1 file changed, 14 insertions(+), 60 deletions(-) diff --git a/docker-compose.coolify.yml b/docker-compose.coolify.yml index bdc8e3d..7580a77 100644 --- a/docker-compose.coolify.yml +++ b/docker-compose.coolify.yml @@ -1,4 +1,3 @@ -name: v15 services: api: build: @@ -42,10 +41,7 @@ services: default: null traefik_network: null ports: - - mode: ingress - target: 8000 - published: "8000" - protocol: tcp + - "8000" restart: unless-stopped casdoor: container_name: procurement-casdoor @@ -75,10 +71,7 @@ services: default: null traefik_network: null ports: - - mode: ingress - target: 8000 - published: "8080" - protocol: tcp + - "8080:8000" restart: unless-stopped frontend: build: @@ -140,20 +133,11 @@ services: default: null traefik_network: null ports: - - mode: ingress - target: 9000 - published: "9000" - protocol: tcp - - mode: ingress - target: 9001 - published: "9001" - protocol: tcp + - "9000" + - "9001" restart: unless-stopped volumes: - - type: volume - source: minio_data - target: /data - volume: {} + - minio_data:/data minio-init: container_name: procurement-minio-init depends_on: @@ -192,26 +176,12 @@ services: networks: default: null ports: - - mode: ingress - target: 5432 - published: "5433" - protocol: tcp + - "5433:5432" restart: unless-stopped volumes: - - type: volume - source: postgres_data - target: /var/lib/postgresql - volume: {} - - type: bind - source: C:\Users\Reza\Desktop\v1.5\sql\migration.sql - target: /docker-entrypoint-initdb.d/01-migration.sql - read_only: true - bind: {} - - type: bind - source: C:\Users\Reza\Desktop\v1.5\sql\02-casdoor-db.sql - target: /docker-entrypoint-initdb.d/02-casdoor-db.sql - read_only: true - bind: {} + - postgres_data:/var/lib/postgresql + - ./sql/migration.sql:/docker-entrypoint-initdb.d/01-migration.sql:ro + - ./sql/02-casdoor-db.sql:/docker-entrypoint-initdb.d/02-casdoor-db.sql:ro traefik: command: - --providers.docker=true @@ -232,29 +202,13 @@ services: networks: traefik_network: null ports: - - mode: ingress - target: 80 - published: "80" - protocol: tcp - - mode: ingress - target: 443 - published: "443" - protocol: tcp + - "80" + - "443" restart: unless-stopped volumes: - - type: bind - source: /var/run/docker.sock - target: /var/run/docker.sock - bind: {} - - type: bind - source: C:\Users\Reza\Desktop\v1.5\infra\traefik-dynamic.yml - target: /etc/traefik/dynamic.yml - read_only: true - bind: {} - - type: volume - source: traefik_certs - target: /certs - volume: {} + - /var/run/docker.sock:/var/run/docker.sock + - ./infra/traefik-dynamic.yml:/etc/traefik/dynamic.yml:ro + - traefik_certs:/certs networks: default: name: v15_default