-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
64 lines (59 loc) · 1.4 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:
competency-client:
container_name: competency-front
ports:
- ${CLIENT_PORT}:${CLIENT_PORT}
build:
context: ./client/
dockerfile: Dockerfile
volumes:
- ./client/:/app/client:cached
- ./shared/:/app/shared
- '/app/client/node_modules'
environment:
API_URL: ${API_URL}
BASE_URL: ${BASE_URL}
restart: unless-stopped
networks:
- postgres
competency-server:
container_name: competency-server
ports:
- ${API_PORT}:${API_PORT}
image: nestjs-api-dev:1.0.0
build:
context: ./server/
dockerfile: Dockerfile
volumes:
- ./server/:/app/server:cached
- ./shared/:/app/shared
- '/app/server/node_modules'
environment:
DB_USERNAME: ${DB_USERNAME}
DB_DATABASE: ${DB_DATABASE}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
PORT: ${API_PORT}
SECRET: ${SECRET}
restart: unless-stopped
networks:
- postgres
competency-db:
image: postgres:12
restart: always
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_USER: $DB_USERNAME
POSTGRES_DB: $DB_DATABASE
PG_DATA: /var/lib/postgresql/data
volumes:
- ~/db/${DB_DATABASE}:/var/lib/postgresql/data
ports:
- ${DB_PORT}:5432
networks:
- postgres
networks:
postgres:
driver: bridge