generated from theycallmetyson/tcmt-mern-app-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (46 loc) · 924 Bytes
/
docker-compose.yml
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
42
43
44
45
46
version: '3.9'
services:
frontend:
container_name: frontend
build:
context: .
dockerfile: frontend/Dockerfile
ports:
- "4000:4000"
links:
- backend
restart: unless-stopped
backend:
container_name: backend
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "3000:3000"
depends_on:
- database
links:
- database
environment:
PORT: 3000
MONGO_URI: mongodb://db:27017
DB_NAME: application-database
restart: unless-stopped
database:
container_name: mongo-database
image: mongo:latest
ports:
- "27017:27017"
restart: unless-stopped
volumes:
- storage:/data/db
- storage:/data/configdb
redis:
container_name: redis-cache
image: redis:alpine
ports:
- "6379:6379"
restart: unless-stopped
volumes:
storage:
name: application-database