-
Notifications
You must be signed in to change notification settings - Fork 46
/
docker-compose.yml
45 lines (44 loc) · 982 Bytes
/
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
version: '3'
services:
db:
image: postgres
environment:
- "POSTGRES_USER=${DB_USER}"
- "POSTGRES_PASSWORD=${DB_PASS}"
- "POSTGRES_DB=${DB_NAME}"
ports:
- 9001:5432
expose:
- "5432"
volumes:
- postgres-data:/var/lib/postgresql/data
govote-server:
build: './server'
container_name: govote-server
ports:
- 3001:3001
expose:
- "3001"
volumes:
- './server:/usr/src/app'
- '/usr/src/app/node_modules'
environment:
- NODE_ENV=development
- "DATABASE_URL=postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}"
env_file:
- ./.env
depends_on:
- db
govote-client:
build: './client'
container_name: govote-client
ports:
- 3000:3000
volumes:
- './client:/usr/src/app'
- '/usr/src/app/node_modules'
environment:
- API_PROXY=http://govote-server:3001
env_file: ./.env
volumes:
postgres-data: