Skip to content

Commit 276b751

Browse files
committed
Nice things
1 parent 3e4e33a commit 276b751

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ build/
3131

3232
### VS Code ###
3333
.vscode/
34+
35+
### Environment Variables ###
36+
.env
37+

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ services:
55
image: postgres:17-alpine
66
container_name: performance-postgres
77
environment:
8-
POSTGRES_DB: performance_db
9-
POSTGRES_USER: postgres
10-
POSTGRES_PASSWORD: postgres
8+
POSTGRES_DB: ${POSTGRES_DB}
9+
POSTGRES_USER: ${POSTGRES_USER}
10+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
1111
ports:
12-
- "5432:5432"
12+
- "${POSTGRES_PORT:-5432}:5432"
1313
volumes:
1414
- postgres_data:/var/lib/postgresql/data
1515
healthcheck:
16-
test: ["CMD-SHELL", "pg_isready -U postgres"]
16+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
1717
interval: 10s
1818
timeout: 5s
1919
retries: 5

src/main/resources/application.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
spring.application.name=k6-performance-test-poc
22

33
# PostgreSQL Configuration
4-
spring.datasource.url=jdbc:postgresql://localhost:5432/performance_db
5-
spring.datasource.username=postgres
6-
spring.datasource.password=postgres
4+
spring.datasource.url=jdbc:postgresql://localhost:${POSTGRES_PORT:5432}/${POSTGRES_DB:performance_db}
5+
spring.datasource.username=${POSTGRES_USER:postgres}
6+
spring.datasource.password=${POSTGRES_PASSWORD}
77
spring.datasource.driver-class-name=org.postgresql.Driver
88

99
# JPA Configuration

0 commit comments

Comments
 (0)