-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.76 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.76 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
services:
# NestJS Application
app:
build:
context: .
dockerfile: Dockerfile
args:
- APP_PORT=${APP_PORT:-3000}
container_name: resume-api-app
restart: unless-stopped
ports:
- '${APP_PORT:-3000}:${APP_PORT:-3000}'
env_file:
- .env
environment:
- NODE_ENV=${NODE_ENV:-development}
# Override database host for Docker network
- DATABASE_HOST=postgres
- DATABASE_PORT=${DATABASE_PORT:-5432}
- DATABASE_USER=${DATABASE_USER:-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD:-postgres123}
- DATABASE_NAME=${DATABASE_NAME:-resume_api}
depends_on:
- postgres
networks:
- resume-api-network
postgres:
image: postgres:17.5-alpine
container_name: resume-api-postgres
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_DB: ${DATABASE_NAME:-resume_api}
POSTGRES_USER: ${DATABASE_USER:-postgres}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-postgres123}
ports:
- '${DATABASE_PORT:-5432}:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- resume-api-network
pgadmin:
image: dpage/pgadmin4:latest
container_name: resume-api-pgadmin
restart: unless-stopped
env_file:
- .env
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@example.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin123}
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- '${PGADMIN_PORT:-5050}:80'
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- postgres
networks:
- resume-api-network
volumes:
postgres_data:
driver: local
pgadmin_data:
driver: local
networks:
resume-api-network:
driver: bridge