我有个电商后端 API, 请问如何用下面的 docker-compose.yml 代码部署 API 到 window 服务器, 谢谢:
version: "3"
services:
server:
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
command: ["yarn", "start:server"]
volumes:
- /usr/src/app
environment:
DB_HOST: database
DB_PORT: 5432
DB_NAME: test
DB_USERNAME: test
DB_PASSWORD: test
worker:
build:
context: .
dockerfile: Dockerfile
command: ["yarn", "start:worker"]
volumes:
- /usr/src/app
environment:
DB_HOST: database
DB_PORT: 5432
DB_NAME: test
DB_USERNAME: test
DB_PASSWORD: test
database:
image: postgres
volumes:
- /var/lib/postgresql/data
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: test
POSTGRES_DB: test