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.
This commit is contained in:
2026-09-08 19:51:55 +03:30
parent 3c3880aec9
commit 4609940856
+14 -60
View File
@@ -1,4 +1,3 @@
name: v15
services: services:
api: api:
build: build:
@@ -42,10 +41,7 @@ services:
default: null default: null
traefik_network: null traefik_network: null
ports: ports:
- mode: ingress - "8000"
target: 8000
published: "8000"
protocol: tcp
restart: unless-stopped restart: unless-stopped
casdoor: casdoor:
container_name: procurement-casdoor container_name: procurement-casdoor
@@ -75,10 +71,7 @@ services:
default: null default: null
traefik_network: null traefik_network: null
ports: ports:
- mode: ingress - "8080:8000"
target: 8000
published: "8080"
protocol: tcp
restart: unless-stopped restart: unless-stopped
frontend: frontend:
build: build:
@@ -140,20 +133,11 @@ services:
default: null default: null
traefik_network: null traefik_network: null
ports: ports:
- mode: ingress - "9000"
target: 9000 - "9001"
published: "9000"
protocol: tcp
- mode: ingress
target: 9001
published: "9001"
protocol: tcp
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- type: volume - minio_data:/data
source: minio_data
target: /data
volume: {}
minio-init: minio-init:
container_name: procurement-minio-init container_name: procurement-minio-init
depends_on: depends_on:
@@ -192,26 +176,12 @@ services:
networks: networks:
default: null default: null
ports: ports:
- mode: ingress - "5433:5432"
target: 5432
published: "5433"
protocol: tcp
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- type: volume - postgres_data:/var/lib/postgresql
source: postgres_data - ./sql/migration.sql:/docker-entrypoint-initdb.d/01-migration.sql:ro
target: /var/lib/postgresql - ./sql/02-casdoor-db.sql:/docker-entrypoint-initdb.d/02-casdoor-db.sql:ro
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: {}
traefik: traefik:
command: command:
- --providers.docker=true - --providers.docker=true
@@ -232,29 +202,13 @@ services:
networks: networks:
traefik_network: null traefik_network: null
ports: ports:
- mode: ingress - "80"
target: 80 - "443"
published: "80"
protocol: tcp
- mode: ingress
target: 443
published: "443"
protocol: tcp
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- type: bind - /var/run/docker.sock:/var/run/docker.sock
source: /var/run/docker.sock - ./infra/traefik-dynamic.yml:/etc/traefik/dynamic.yml:ro
target: /var/run/docker.sock - traefik_certs:/certs
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: {}
networks: networks:
default: default:
name: v15_default name: v15_default