-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
96 lines (92 loc) · 1.97 KB
/
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
services:
#
# Main services
#
backend:
command: "/app/scripts/backend.sh"
tty: true
stdin_open: true
container_name: "weatherapp_backend"
user: "web:web"
build:
context: .
target: weatherapp_backend
volumes:
- ".:/app/"
environment:
- NODE_DEBUG
- NODE_ENV
- PORT=9000
- APPID
- MAP_ENDPOINT
ports:
- "9000:9000"
frontend:
command: "/app/scripts/frontend.sh"
tty: true
stdin_open: true
container_name: "weatherapp_frontend"
user: "web:web"
build:
context: .
target: weatherapp_frontend
volumes:
- ".:/app/"
environment:
- NODE_DEBUG
- PORT=8000
- NODE_ENV
# - ENDPOINT='http://localhost:9000/api'
ports:
- "8000:8000"
links:
- backend
nginx:
image: nginx:latest
container_name: weatherapp_nginx
tty: true
stdin_open: true
command: /bin/bash -c "cat /etc/nginx/conf.d/templates/*.conf.template|envsubst '$$PRODUCTION_PORT' > /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/*.conf && nginx -g 'daemon off;'"
volumes:
- ./:/app
- ./nginx/:/etc/nginx/conf.d/templates
# TODO: use env vars here
ports:
- 80:80
environment:
- PRODUCTION_PORT=80
links:
- backend
testing:
command: "/app/scripts/test.sh"
tty: true
stdin_open: true
container_name: "weatherapp_testing"
user: "web:web"
build:
context: .
target: weatherapp_testing
volumes:
- ".:/app/"
environment:
- NODE_DEBUG
- MAP_ENDPOINT=http://mockapi:9100/data/2.5
- STAY_ALIVE
links:
- mockapi
mockapi:
command: "/app/scripts/mockapi.sh"
tty: true
stdin_open: true
container_name: "weatherapp_mockapi"
user: "web:web"
build:
context: .
target: weatherapp_mockapi
volumes:
- ".:/app/"
environment:
- NODE_DEBUG
- PORT=9100
ports:
- "9100:9100"