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

Fix: docker compose #22

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
19 changes: 15 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
name: payments-api

services:
payments_api:
Expand All @@ -8,12 +8,13 @@ services:
context: .
dockerfile: Dockerfile
depends_on:
- payments_db
payments_db:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: local
AWS_ACCESS_KEY_ID: "fakekey"
AWS_SECRET_ACCESS_KEY: "fakeaccesskey"
AWS_DYNAMODB_ENDPOINT: payments_db:54000
AWS_DYNAMODB_ENDPOINT: http://paymentsdb:54000
AWS_REGION: us-east-1
ADMIN_ACCESS_TOKEN: token
MOCK_PAYMENT_PROVIDER: true
Expand All @@ -25,18 +26,28 @@ services:
ports:
- "8082:8082"
restart: always
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8082/actuator/health"]
interval: 10s
timeout: 5s
retries: 5

payments_db:
image: amazon/dynamodb-local:latest
container_name: payments_db
hostname: paymentsdb
ports:
- "54000:8000"
environment:
AWS_ACCESS_KEY_ID: "fakekey"
AWS_SECRET_ACCESS_KEY: "fakeaccesskey"
AWS_REGION: us-east-1
command: ["-D\"java.library.path\"=./DynamoDBLocal_lib", "-jar", "DynamoDBLocal.jar", "-inMemory", "-sharedDb"]
healthcheck:
test: ["CMD-SHELL", "curl localhost:8000"]
interval: 10s
timeout: 5s
retries: 5

volumes:
payments_db:
driver: local
Loading