Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.58 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
services:
db:
image: postgres:16
environment:
POSTGRES_DB: ${POSTGRES_DB:-spring_boot_tutorial}
POSTGRES_USER: ${POSTGRES_USER:-spring_boot_tutorial}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-spring_boot_tutorial}
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-spring_boot_tutorial}"]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
depends_on:
db:
condition: service_healthy
mailhog:
condition: service_started
environment:
SPRING_PROFILES_ACTIVE: prod
DB_URL: ${DB_URL:-jdbc:postgresql://db:5432/spring_boot_tutorial}
DB_USERNAME: ${DB_USERNAME:-spring_boot_tutorial}
DB_PASSWORD: ${DB_PASSWORD:-spring_boot_tutorial}
JWT_SECRET: ${JWT_SECRET:-docker-compose-demo-jwt-secret-please-override-in-real-prod-987654321}
MAIL_HOST: ${MAIL_HOST:-mailhog}
MAIL_PORT: ${MAIL_PORT:-1025}
MAIL_USERNAME: ${MAIL_USERNAME:-}
MAIL_PASSWORD: ${MAIL_PASSWORD:-}
MAIL_SMTP_AUTH: ${MAIL_SMTP_AUTH:-false}
MAIL_SMTP_STARTTLS: ${MAIL_SMTP_STARTTLS:-false}
APP_BASE_URL: ${APP_BASE_URL:-http://localhost:8080}
APP_NOTIFICATION_ADMIN_EMAIL: ${APP_NOTIFICATION_ADMIN_EMAIL:-admin@example.com}
APP_STORAGE_UPLOAD_DIR: ${APP_STORAGE_UPLOAD_DIR:-./uploads/products}
ports:
- "8080:8080"
volumes:
- ./uploads:/app/uploads
mailhog:
image: mailhog/mailhog
ports:
- "1025:1025"
- "8025:8025"
volumes:
db-data: