49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
# 所有网站类服务统一放在 project name: website 下
|
||
# 只使用唯一 MongoDB:datacenter_mongodb(宿主机 27017),不在此编排中新建 MongoDB
|
||
# 使用方式:在神射手目录执行 docker compose up -d
|
||
# 神射手:http://localhost:3117 玩值电竞:http://localhost:3001
|
||
|
||
name: website
|
||
|
||
services:
|
||
shensheshou:
|
||
build: .
|
||
image: shensheshou:latest
|
||
container_name: website-shensheshou
|
||
environment:
|
||
NODE_ENV: production
|
||
PORT: "3117"
|
||
# 唯一 MongoDB:datacenter_mongodb(宿主机 27017)
|
||
MONGODB_URI: "mongodb://host.docker.internal:27017"
|
||
ports:
|
||
- "3117:3117"
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
restart: unless-stopped
|
||
networks:
|
||
- website
|
||
|
||
# 玩值电竞 Web:与神射手同属 website,共用唯一 MongoDB(datacenter_mongodb 27017)
|
||
wanzhi-web:
|
||
build:
|
||
context: ../../3、自营项目/玩值电竞App
|
||
dockerfile: Dockerfile
|
||
args:
|
||
BUILD_TIME: ${BUILD_TIME:-}
|
||
image: wanzhi-app:latest
|
||
container_name: website-wanzhi-web
|
||
environment:
|
||
MONGODB_URI: mongodb://host.docker.internal:27017
|
||
NODE_ENV: production
|
||
ports:
|
||
- "3001:3000"
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
restart: unless-stopped
|
||
networks:
|
||
- website
|
||
|
||
networks:
|
||
website:
|
||
driver: bridge
|