27 lines
451 B
YAML
27 lines
451 B
YAML
services:
|
|
mongodb:
|
|
image: mongo:7
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: root
|
|
MONGO_INITDB_ROOT_PASSWORD: password123
|
|
networks:
|
|
- net
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
depends_on:
|
|
- mongodb
|
|
ports:
|
|
- "8000:8000"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
MONGODB_URI: mongodb://root:password123@mongodb:27017/db?authSource=admin
|
|
networks:
|
|
- net
|
|
- default
|
|
|
|
networks:
|
|
net:
|