37 lines
978 B
YAML
37 lines
978 B
YAML
# 本地参考配置 — 服务器上的实际文件在 /disk/docker-compose/vending-machine/
|
|
services:
|
|
vending-machine-api:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: src/VendingMachine.Api/Dockerfile
|
|
container_name: vending-machine-api
|
|
ports:
|
|
- "${API_PORT:-5082}:8080"
|
|
volumes:
|
|
- ./configs/api/appsettings.json:/app/appsettings.Production.json:ro
|
|
- ./configs/api/appsettings.json:/app/appsettings.json:ro
|
|
- ./configs/wwwroot:/app/wwwroot
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- ASPNETCORE_URLS=http://+:8080
|
|
restart: unless-stopped
|
|
networks:
|
|
- code-network
|
|
|
|
vending-machine-admin:
|
|
build:
|
|
context: ./admin
|
|
dockerfile: Dockerfile
|
|
container_name: vending-machine-admin
|
|
ports:
|
|
- "${ADMIN_PORT:-3100}:80"
|
|
depends_on:
|
|
- vending-machine-api
|
|
restart: unless-stopped
|
|
networks:
|
|
- code-network
|
|
|
|
networks:
|
|
code-network:
|
|
external: true
|