-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
69 lines (68 loc) · 1.96 KB
/
docker-compose-dev.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
# development environment specific only
version: '3.1'
services:
# https://hub.docker.com/_/postgres
postgres:
image: 'postgres:latest'
restart: always
volumes:
- pgdata:/var/lib/postgresql/data
# https://github.com/docker-library/docs/blob/master/postgres/README.md#environment-variables
environment:
- POSTGRES_DB=pgmulticontainer
- POSTGRES_PASSWORD=3497Wa
redis:
image: 'redis:latest'
ngins:
depends_on:
- api
- client
restart: always
build:
context: ./nginx
dockerfile: Dockerfile.dev
ports:
- '3050:80'
api:
# Build api service
build:
context: ./server
dockerfile: Dockerfile.dev
# Add a new volume to the api service for the bind mount.
volumes:
# Inside the container, don't try to override this folder. Don't try to override it, don't try to redirect access to it, just leave that folder as is.
- /app/node_modules
# Look at the `server` directory, and copy everything inside there into the `app` folder of the container.
- ./server:/app
# https://docs.docker.com/compose/environment-variables/set-environment-variables/#use-the-environment-attribute
# You can set environment variables in a service's containers with the environment attribute in your Compose file.
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PGUSER=postgres
- PGHOST=postgres
- PGDATABASE=pgmulticontainer
- PGPASSWORD=3497Wa
- PGPORT=5432
client:
build:
context: ./client
dockerfile: Dockerfile.dev
volumes:
- /app/node_modules
- ./client:/app
environment:
# Fixes bug where websocket connection is fixed to default port 3000
- WDS_SOCKET_PORT=0
worker:
build:
context: ./worker
dockerfile: Dockerfile.dev
volumes:
- /app/node_modules
- ./worker:/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
volumes:
pgdata: