-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (57 loc) · 1.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (57 loc) · 1.65 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
services:
postgres:
image: postgres:16-alpine
container_name: spring-auth-db
restart: unless-stopped
environment:
POSTGRES_DB: spring_auth_db
POSTGRES_USER: ${DATABASE_USERNAME:-postgres}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-postgres}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USERNAME:-postgres} -d spring_auth_db"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- spring-auth-network
app:
image: eclipse-temurin:21-jdk-alpine
container_name: spring-auth-app
restart: unless-stopped
working_dir: /app
volumes:
- ./:/app
- gradle_cache:/root/.gradle
command: sh -c "./gradlew classes --continuous --no-daemon & ./gradlew bootRun --no-daemon"
depends_on:
postgres:
condition: service_healthy
ports:
- "${APPLICATION_PORT:-8080}:8080"
environment:
APPLICATION_NAME: SpringBootAuth
DATABASE_HOST: jdbc:postgresql://postgres:5432/spring_auth_db
DATABASE_USERNAME: ${DATABASE_USERNAME:-postgres}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-postgres}
APPLICATION_PORT: 8080
JWT_EXPIRATION: ${JWT_EXPIRATION:-86400000}
MAIL_HOST: ${MAIL_HOST:-smtp.gmail.com}
MAIL_PORT: ${MAIL_PORT:-587}
MAIL_USERNAME: ${MAIL_USERNAME:-}
MAIL_PASSWORD: ${MAIL_PASSWORD:-}
SPRING_PROFILES_ACTIVE: dev
networks:
- spring-auth-network
volumes:
postgres_data:
driver: local
gradle_cache:
driver: local
networks:
spring-auth-network:
driver: bridge