-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
45 lines (42 loc) · 1.06 KB
/
compose.yml
File metadata and controls
45 lines (42 loc) · 1.06 KB
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
services:
db:
container_name: fitness-db
image: postgres:18.1-alpine3.22
environment:
POSTGRES_DB: fitness
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
pgadmin:
container_name: fitness-pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com # use your email
PGADMIN_DEFAULT_PASSWORD: admin123 # set a strong password
ports:
- "5050:80" # Access pgAdmin on http://localhost:5050
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- db
api:
container_name: flex-fit-api
image: dwani/flex-fit-api:latest
ports:
- "80:8000"
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/fitness
depends_on:
db:
condition: service_healthy
volumes:
postgres_data:
pgadmin_data: