-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (41 loc) · 929 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (41 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: '3.7'
services:
database:
image: mongo:latest
container_name: recipies_db
env_file: .env
environment:
- db=${db}
- rootuser=${rootuser}
- rootpassword=${rootpassword}
- dbuser=${dbuser}
- dbpassword=${dbpassword}
volumes:
- './backup/mongobackups:/var/backups/mongobackups'
- './backup/db:/data/db'
- './mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh'
ports:
- '27017:27017'
networks:
- recipiesnetwork
restart: unless-stopped
api:
image: recipies-api:latest
container_name: recipies_api
build: .
networks:
- recipiesnetwork
ports:
- '3000:3000'
volumes:
- './:/usr/src/app'
- '/usr/src/app/node_modules'
depends_on:
- database
links:
- database
restart: unless-stopped
networks:
recipiesnetwork:
name: recipiesnetwork
driver: bridge