Skip to content

Instantly share code, notes, and snippets.

@WoHal
Last active March 27, 2025 06:40
Show Gist options
  • Select an option

  • Save WoHal/7cb9425f7dfd5b7a33c7a2bfa6a74201 to your computer and use it in GitHub Desktop.

Select an option

Save WoHal/7cb9425f7dfd5b7a33c7a2bfa6a74201 to your computer and use it in GitHub Desktop.
yapi docker_compose file
services:
yapi:
image: wohal/yapi:latest
container_name: yapi
environment:
- VERSION=1.12.0
- HOME=/home
- PORT=3000
- [email protected] # CHANGE ME
- DB_SERVER=mongo
- DB_NAME=yapi
- DB_PORT=27017
restart: always
ports:
- 3000:3000
volumes:
- ./log:/home/log # log dir
- ./vendors:/home/vendors
depends_on:
mongo:
condition: service_healthy
mongo:
image: mongo
container_name: mongo
restart: always
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh mongo:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
ports:
- 27017:27017
volumes:
- ./mongodb:/data/db #db dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment