-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 1.19 KB
/
Copy pathdocker-compose.yml
File metadata and controls
58 lines (54 loc) · 1.19 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
# Docker Compose - Desarrollo Local
# Uso: docker compose up
services:
db:
image: postgres:15-alpine
container_name: authdb-dev
restart: unless-stopped
environment:
POSTGRES_DB: authdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres_dev_password
ports:
- "5432:5432"
volumes:
- pgdata-dev:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d authdb"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
networks:
- app-network
api:
build:
context: .
target: development
container_name: authapi-dev
restart: unless-stopped
ports:
- "3001:3001"
environment:
NODE_ENV: development
DB_HOST: db
DB_USER: postgres
DB_PASSWORD: postgres_dev_password
DB_NAME: authdb
DB_DIALECT: postgres
DB_PORT: 5432
JWT_SECRET: dev_jwt_secret_change_in_production
volumes:
- ./src:/app/src
- ./seed.js:/app/seed.js
depends_on:
db:
condition: service_healthy
networks:
- app-network
volumes:
pgdata-dev:
driver: local
networks:
app-network:
driver: bridge