-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (52 loc) · 1.28 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
version: '2'
services:
postgres:
image: 'postgres:latest'
redis:
image: 'redis:latest'
nginx:
restart: always
build:
dockerfile: Dockerfile.dev
context: ./nginx
ports:
- '3001:80'
api:
# say to compose that first we need to build image
build:
# for custom dockerfile name
dockerfile: Dockerfile.dev
# point the folder with config file
context: ./server
# bind local files to container(for development)
volumes:
# exclude node_modules from beeing observed
- /home/app/server/node_modules
# include files that we wanna to observe
- ./server:/home/app/server
#set environment variable for current container
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PGUSER=postgres
- PGHOST=postgres
- PGDATABASE=postgres
- PGPASSWORD=postgres_password
- PGPORT=5432
client:
build:
dockerfile: Dockerfile.dev
context: ./client
volumes:
- /home/app/client/node_modules
- ./client:/home/app/client
worker:
build:
dockerfile: Dockerfile.dev
context: ./worker
volumes:
- /home/app/worker/node_modules
- ./worker:/home/app/worker
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379