Auto build image when we run `docker compose up`, Make it start more easy for beginner. ## Motivation and Context When I try to use `docker compose up` start the MCP server, docker default pull `registry` image from dockerhub, because I forget build image first. Maybe we don't need to manually build the image, just build it automatically when docker compose starts ## How Has This Been Tested? Just run `docker-compose up --build` at a environment has installed docker and docker compose. Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com> Co-authored-by: adam jones <domdomegg+git@gmail.com>
29 lines
759 B
YAML
29 lines
759 B
YAML
services:
|
|
registry:
|
|
image: registry
|
|
container_name: registry
|
|
build:
|
|
dockerfile: Dockerfile
|
|
links:
|
|
- mongodb
|
|
depends_on:
|
|
- mongodb
|
|
environment:
|
|
- MCP_REGISTRY_DATABASE_URL=${MCP_REGISTRY_DATABASE_URL:-mongodb://mongodb:27017}
|
|
- MCP_REGISTRY_ENVIRONMENT=${MCP_REGISTRY_ENVIRONMENT:-test}
|
|
- MCP_REGISTRY_GITHUB_CLIENT_ID=${MCP_REGISTRY_GITHUB_CLIENT_ID}
|
|
- MCP_REGISTRY_GITHUB_CLIENT_SECRET=${MCP_REGISTRY_GITHUB_CLIENT_SECRET}
|
|
ports:
|
|
- 8080:8080
|
|
restart: "unless-stopped"
|
|
mongodb:
|
|
image: mongo
|
|
container_name: mongodb
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
volumes:
|
|
- './.db:/data/db'
|
|
ports:
|
|
- 27017:27017
|
|
restart: "unless-stopped"
|