-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.yml
51 lines (42 loc) · 1.21 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
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy:latest@sha256:e869d7aea7c5d4bae95c42267d22c913c46afd2dd8113ebe2a24423926ba1fff
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- api
api:
build: ./projects/api
depends_on:
- postgres
- redis
environment:
# These env variables are necessary to let Nginx reverse proxy us.
- VIRTUAL_HOST=api.margaret.com
- VIRTUAL_PORT=8080
# These env variables will be read from the host machine.
- MIX_ENV
web:
build: ./projects/web
environment:
# These env variables are necessary to let Nginx reverse proxy us.
- VIRTUAL_HOST=margaret.com
- VIRTUAL_PORT=80
# These env variables will be read from the host machine.
- NODE_ENV
ml:
build: ./projects/ml
postgres:
image: postgres:10.3@sha256:4bee009f05db292e794d4c288b587be60c3a526cc3bf669100be981ef0551284
volumes:
- postgres_data:/var/lib/postgresql/data/
redis:
image: redis:4.0.10@sha256:f20ec679e1bdf0b6a83b4b4d4097dddf08edf0aa3cc6ff2ef4b9afebb0c8b5ef
volumes:
- redis_data:/data
volumes:
postgres_data:
redis_data: