Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: delete vault #55

Merged
merged 2 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation:2.7.3'
implementation 'org.springframework.cloud:spring-cloud-starter-vault-config:3.1.1'
implementation 'org.springframework.cloud:spring-cloud-dependencies:2021.0.3'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
Expand Down
30 changes: 8 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ services:
build:
context: .
ports:
- 8080:8080
- "8080:8080"
depends_on:
- postgres
- vault
- redis
environment:
- spring_cloud_vault_uri=http://vault:8200
- spring_cloud_vault_token=insert-your-TOKEN
- spring_profiles_active=dev
- spring_datasource_password=gooseauth
- spring_datasource_url=jdbc:postgresql://postgres:5432/gooseauth
- spring_datasource_username=gooseauth
- spring_jpa_hibernate_ddl-auto=create
- spring_redis_host=redis
volumes:
- ./volumes/api/logs:/volumes/api/logs
Expand All @@ -25,7 +25,7 @@ services:
image: postgres:13
container_name: goose-auth-api-postgres
ports:
- 5431:5432
- "5431:5432"
environment:
POSTGRES_USER: gooseauth
POSTGRES_PASSWORD: gooseauth
Expand All @@ -42,29 +42,15 @@ services:
image: redis:latest
container_name: goose-auth-api-redis
ports:
- 6379:6379
- "6379:6379"
expose:
- 6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 30s
retries: 50
restart: always

vault:
image: vault:latest
container_name: goose-auth-api-vault
ports:
- 8200:8200
restart: always
volumes:
- ./volumes/logs:/vault/logs
- ./volumes/file:/vault/file
- ./volumes/config:/vault/config
cap_add:
- IPC_LOCK
entrypoint: vault server -config=/vault/config/vault.json

volumes:
postgres-db-volume:
18 changes: 5 additions & 13 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,20 @@ logging:

spring:
datasource:
username: vault
password: vault
url: vault
username: docker-compose-environment
password: docker-compose-environment
url: docker-compose-environment

redis:
host: vault
host: docker-compose-environment
port: 6379
timeout: 3000

config:
import: vault://

cloud:
vault:
uri: http://localhost:8200
token: insert-your-TOKEN

jpa:
show-sql: true
properties:
hibernate:
ddl-auth: vault
ddl-auth: update
default_batch_fetch_size: 1000
format_sql: true

Expand Down
18 changes: 5 additions & 13 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,20 @@ logging:

spring:
datasource:
username: vault
password: vault
url: vault
username: docker-compose-environment
password: docker-compose-environment
url: docker-compose-environment

redis:
host: localhost
host: vault
port: 6379
timeout: 3000

config:
import: vault://

cloud:
vault:
uri: http://localhost:8200
token: insert-your-TOKEN

jpa:
show-sql: true
properties:
hibernate:
ddl-auth: vault
ddl-auth: update
default_batch_fetch_size: 1000
format_sql: true

Expand Down
3 changes: 0 additions & 3 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ server:
port: 8080

spring:
cloud:
vault:
enabled: false

jpa:
show-sql: true
Expand Down