-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (53 loc) · 1.04 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
version: '3.8'
services:
# Postgres database
postgres:
container_name: postgres
image: postgres:15.0-alpine
restart: always
environment:
- POSTGRES_USER=${TYPEORM_USERNAME}
- POSTGRES_PASSWORD=${TYPEORM_PASSWORD}
- POSTGRES_DB=${TYPEORM_DB}
volumes:
- postgres_data:/var/lib/postgresql/data/
networks:
- default-network
ports:
- ${TYPEORM_PORT}:${TYPEORM_PORT}
expose:
- ${TYPEORM_PORT}
# Client
client:
container_name: client
build:
context: .
dockerfile: /apps/client/Dockerfile
networks:
- default-network
ports:
- 8080:80
depends_on:
- server
- postgres
# Server
server:
container_name: server
build:
context: .
dockerfile: /apps/server/Dockerfile
links:
- postgres
environment:
- TYPEORM_HOST=postgres
networks:
- default-network
ports:
- 3000:3000
depends_on:
- postgres
volumes:
postgres_data:
driver: local
networks:
default-network: