-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (58 loc) · 1.46 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: '3.8'
services:
app:
container_name: twitch-dev-server
env_file:
- .env
restart: always
build:
context: .
dockerfile: Dockerfile.dev
target: development
ports:
- ${PORT}:${PORT}
volumes:
- ./src:/usr/src/app/src
- ./tsconfig.json:/usr/src/app/tsconfig.json
external_links:
- mongo
environment:
- NODE_ENV=development
command: npm run dev
prod-app:
container_name: twitch-prod-server
restart: always
build:
context: .
dockerfile: Dockerfile
target: production
env_file:
- .env
ports:
- ${PORT}:${PORT}
volumes:
- ./src:/usr/src/app/src
- ./tsconfig.json:/usr/src/app/tsconfig.json
external_links:
- mongo
environment:
- NODE_ENV=production
command: npm run start
mongo:
container_name: mongo
image: mongo:latest
restart: always
volumes:
- ./data:/data/db
ports:
- '27012:27017'
nginx:
image: reverse-proxy
restart: always
build:
context: ./nginx
dockerfile: Dockerfile.nginx
container_name: ${NGINX_HOST}
env_file: .env
ports:
- ${NGINX_PORT}:${NGINX_PORT}