build(backend): one shared Dockerfile with cargo cache mounts, sequential compose build, stripped release binaries
Some checks failed
CI / backend (cargo test + clippy) (push) Failing after 1s
CI / frontend (lint + test + build) (push) Failing after 26s
CI / mod (gradle test + checkFolderLimit) (push) Successful in 1m57s

All four services now share one builder stage (dependencies compile once per
deploy, not once per service). BuildKit cache mounts keep the cargo registry
and target/ between deploys: a one-line change rebuilds in ~16 s instead of
recompiling the whole dependency tree.
This commit is contained in:
loki5512344 2026-10-09 22:01:09 +02:00
parent cc33b6e4fc
commit b0ee4ab317
Signed by: boba
GPG key ID: 253067914055423B
8 changed files with 70 additions and 86 deletions

View file

@ -62,7 +62,8 @@ services:
accounts-service:
build:
context: .
dockerfile: accounts-service/Dockerfile
dockerfile: Dockerfile
target: accounts-service
restart: unless-stopped
depends_on:
postgres:
@ -94,7 +95,8 @@ services:
configs-service:
build:
context: .
dockerfile: configs-service/Dockerfile
dockerfile: Dockerfile
target: configs-service
restart: unless-stopped
depends_on:
postgres:
@ -111,7 +113,8 @@ services:
chat-service:
build:
context: .
dockerfile: chat-service/Dockerfile
dockerfile: Dockerfile
target: chat-service
restart: unless-stopped
env_file: .env
environment:
@ -121,7 +124,8 @@ services:
gateway:
build:
context: .
dockerfile: gateway/Dockerfile
dockerfile: Dockerfile
target: gateway
restart: unless-stopped
depends_on:
accounts-service: