-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (55 loc) · 1.28 KB
/
docker-compose.yml
File metadata and controls
60 lines (55 loc) · 1.28 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
version: '3.8'
services:
app:
build: .
ports:
- "8080:8080"
environment:
SPRING_PROFILES_ACTIVE: dev
DB_URL: ${DB_URL}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
MAIL_HOST: ${MAIL_HOST}
MAIL_PORT: ${MAIL_PORT}
MAIL_USER: ${MAIL_USER}
MAIL_PASSWORD: ${MAIL_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRATION_MS: ${JWT_EXPIRATION_MS}
depends_on:
db:
condition: service_healthy
networks:
- blog-network
db:
image: postgres:latest
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d cyberblog"]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: cyberblog
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres/init:/docker-entrypoint-initdb.d
networks:
- blog-network
adminer:
image: adminer:latest
ports:
- "8888:8080"
environment: # Añade estas variables
ADMINER_DEFAULT_SERVER: db
networks:
- blog-network # Asegúrate de que está en la misma red
depends_on:
- db
networks:
blog-network:
name: blog-network
volumes:
postgres_data: