The additional_contexts approach required cc-platform-core to exist on the Docker host at a relative path. This fails on servers where the repo layout differs. Instead, use a multi-stage build: stage 1 clones cc-platform-core from Gitea (depth 1), stage 2 copies server/ into the app and rewrites the file: path. Fully self-contained — no host deps.
33 lines
571 B
YAML
33 lines
571 B
YAML
services:
|
|
server:
|
|
build: ./server
|
|
networks:
|
|
- inventory-network
|
|
volumes:
|
|
- server-data:/data
|
|
environment:
|
|
- API_KEY=${API_KEY:-}
|
|
- TURTLE_SERVER_URL=${TURTLE_SERVER_URL:-}
|
|
restart: unless-stopped
|
|
|
|
client:
|
|
build:
|
|
context: ./client
|
|
args:
|
|
VITE_API_KEY: ${API_KEY:-}
|
|
ports:
|
|
- "80:80"
|
|
networks:
|
|
- inventory-network
|
|
depends_on:
|
|
server:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
inventory-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
server-data:
|