29 lines
500 B
YAML
29 lines
500 B
YAML
|
version: '3'
|
||
|
services:
|
||
|
web:
|
||
|
build: .
|
||
|
ports:
|
||
|
- '3000:3000'
|
||
|
depends_on:
|
||
|
- db
|
||
|
environment:
|
||
|
- MONGO_URL=mongodb://db:27017/nestjs
|
||
|
networks:
|
||
|
- appnet
|
||
|
db:
|
||
|
image: mongo
|
||
|
environment:
|
||
|
- MONGO_INITDB_DATABASE=nestjs
|
||
|
- MONGO_INITDB_ROOT_USERNAME=admin
|
||
|
- MONGO_INITDB_ROOT_PASSWORD=adminpassword
|
||
|
volumes:
|
||
|
- dbdata:/data/db
|
||
|
networks:
|
||
|
- appnet
|
||
|
networks:
|
||
|
appnet:
|
||
|
driver: bridge
|
||
|
volumes:
|
||
|
dbdata:
|
||
|
driver: local
|