-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
99 lines (91 loc) · 2.45 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
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
97
98
99
version: '3'
# Run as
# docker-compose build; docker-compose up -d
# Check with
# docker ps
# Then check the logs with
# docker logs --tail 50 $container_id
# docker-compose logs --tail 20 tf_counts
services:
traefik-manager:
image: traefik:1.5-alpine
restart: always
command: [
"traefik",
"--api",
"--docker",
"--web",
'--logLevel=info',
'--docker.domain=localhost',
'--docker.endpoint=unix:///var/run/docker.sock',
'--docker.watch=true',
'--docker.exposedbydefault=false'
]
container_name: traefik
labels:
- traefik.frontend.entryPoints=http
- traefik.frontend.rule=PathPrefixStrip:/traefik;Host:localhost
- traefik.port=8080
- traefik.enable=true
networks:
- proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
redis:
image: redis:alpine
networks:
- proxy
udacity-finding-donors-server:
build:
context: finding_donors_flask_app
dockerfile: Dockerfile
environment:
DONOR_DATA: /home/flask/finding_donors_flask_app/materials/census.csv
ports:
- "5000:5000"
labels:
- traefik.backend=udacity-finding-donors-server
- traefik.frontend.entryPoints=http
- traefik.frontend.rule=PathPrefixStrip:/server;Host:localhost
- traefik.docker.network=proxy
- traefik.frontend.headers.customresponseheaders.Access-Control-Allow-Origin = '*'
- traefik.port=5000
- traefik.enable=true
depends_on:
- redis
networks:
- proxy
udacity-finding-donors-client:
build:
context: finding-donors-web-app
dockerfile: nginx/Dockerfile
labels:
- traefik.backend=udacity-finding-donors-client
- traefik.frontend.entryPoints=http
- traefik.frontend.rule=Host:localhost
- traefik.docker.network=proxy
- traefik.frontend.headers.customresponseheaders.Access-Control-Allow-Origin = '*'
- traefik.port=80
- traefik.enable=true
depends_on:
- udacity-finding-donors-server
networks:
- proxy
## This image is only for building the angular interface. It is not used in the final AWS config
angular6-build:
build:
context: finding-donors-web-app
dockerfile: Dockerfile
ports:
- "4200:4200"
volumes:
- ./finding-donors-web-app:/app:rw
networks:
- proxy
networks:
proxy:
driver: bridge