-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 964 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.9"
services:
# NestJS Backend Service
nest-backend:
build:
context: ./packages/nest-backend
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- DB_HOST=postgres
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=123456
- DB_DATABASE=nestdb
depends_on:
- postgres
command: >
sh -c "npm run start:dev"
# Angular Frontend Service
angular-frontend:
build:
context: ./packages/angular-frontend
dockerfile: Dockerfile
ports:
- "4200:4200"
command: >
sh -c "ng serve --host 0.0.0.0 --disable-host-check"
# PostgreSQL Database Service
postgres:
image: postgres:15
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
POSTGRES_DB: nestdb
ports:
- "5433:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
volumes:
postgres-data: