-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.prod.yml
More file actions
47 lines (44 loc) · 877 Bytes
/
Copy pathcompose.prod.yml
File metadata and controls
47 lines (44 loc) · 877 Bytes
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
services:
postgres:
image: postgres:18
container_name: postgres
restart: always
volumes:
- db-data:/var/lib/postgresql
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 1s
timeout: 5s
retries: 10
# apps
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: api
restart: unless-stopped
ports:
- 3000:3000
depends_on:
- postgres
env_file:
- .env
app:
build:
context: .
dockerfile: apps/app/Dockerfile
container_name: app
restart: always
ports:
- 4200:4200
depends_on:
- api
environment:
# prevent SSRF for local development
- NG_ALLOWED_HOSTS=localhost
volumes:
db-data: