-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (62 loc) · 1.67 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'
services:
postgres:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=password
redis:
# (1)
image: redis:latest
container_name: redis
environment:
- REDIS_HOST=password
ports:
- "6379:6379"
nginx:
restart: always # always restart the nginx container if it crashes
build:
context: ./nginx
dockerfile: Dockerfile.dev
ports:
- "3050:80"
depends_on:
- client
- api
api:
build:
context: ./server # Path to the Dockerfile
dockerfile: Dockerfile.dev
volumes:
# volumes are used to share files between the host and the container ~ WORKDIR FILE SHARING
- /app/node_modules # dont try to override the node_modules folder in the container
- ./server:/app # share the server folder with the container
environment:
- REDIS_HOST=redis # specify the redis host as the name of the service (1)
- REDIS_PORT=6379 # specify the redis port
- PGUSER=postgres # specify the postgres user
- PGHOST=postgres # specify the postgres host
- PGDATABASE=postgres # specify the postgres database
- PGPASSWORD=password # specify the postgres password
- PGPORT=5432 # specify the postgres port
worker:
build:
dockerfile: Dockerfile.dev
context: ./worker
volumes:
- /app/node_modules
- ./worker:/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
client:
build:
dockerfile: Dockerfile.dev
context: ./client
volumes:
- /app/node_modules
- ./client:/app
environment:
- WDS_SOCKET_PORT=0