-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (38 loc) · 894 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (38 loc) · 894 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
services:
# PostgreSQL database service
db:
image: postgres:16-alpine
container_name: taskdb_postgres
environment:
POSTGRES_USER: vrishalij
POSTGRES_PASSWORD: yourpassword
POSTGRES_DB: taskdb
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vrishalij -d taskdb"]
interval: 5s
timeout: 5s
retries: 5
# Node.js API service
api:
build: .
container_name: taskion_api
ports:
- "5000:5000"
environment:
PORT: 5000
DB_USER: vrishalij
DB_HOST: db
DB_NAME: taskdb
DB_PASSWORD: yourpassword
DB_PORT: 5432
JWT_SECRET: my_super_secret_key
depends_on:
db:
condition: service_healthy
volumes:
postgres_data: