Use additional_contexts to copy platform server package into the Docker build context. Rewrites the file: dependency path and removes the lockfile so npm install can resolve the local package correctly.
36 lines
668 B
YAML
36 lines
668 B
YAML
services:
|
|
server:
|
|
build:
|
|
context: ./server
|
|
additional_contexts:
|
|
platform-server: ../../cc-platform-core/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:
|