-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
56 lines (50 loc) · 966 Bytes
/
docker-compose.yaml
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
47
48
49
50
51
52
53
54
55
56
# Docker-compose version
version: '3'
# Define the services/containers to be run
services:
# Database
database:
# image to build container from
image: mongo:4.1
ports:
- "27018:27017"
networks:
- backend_network
# Backend
backend:
# directory of Dockerfile
build: ./server
ports:
- "3000:3000"
# link this service to database service
links:
- database
environment:
- ENVIRONMENT=DOCKER
networks:
- backend_network
depends_on:
- database
# Frontend
frontend:
build: ./client
ports:
- "2000:2000"
networks:
- frontend_network
# Proxy server
nginx:
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
depends_on:
- backend
- frontend
networks:
- frontend_network
- backend_network
networks:
frontend_network:
backend_network: