bot-api/compose.yaml

35 lines
727 B
YAML
Raw Normal View History

version: '3'
services:
mongodb:
image: mongo
container_name: mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: bot
volumes:
- mongodb_data:/data/db
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
bot-api:
image: oven/bun:1
container_name: bot-api
command: bun run dev
working_dir: /usr/src/app
ports:
- "8080:8080"
depends_on:
- mongodb
environment:
MONGODB_URI: "mongodb://mongodb:27017/bot"
MONGODB_USER: "root"
MONGODB_PASS: "password"
volumes:
- ./:/usr/src/app:ro
volumes:
mongodb_data: