Skip to content

Commit

Permalink
update credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
HTSagara committed Aug 2, 2024
1 parent c789e03 commit 949b632
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
35 changes: 31 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
version: '3.8'

services:
# Fragments microservice API server
fragments:
# Use a proper init process (tini)
init: true
# Build the Docker Image using the Dockerfile
# and current directory as the build context
build: .
# Environment variables to use
environment:
# Our API will be running on http://localhost:8080
- API_URL=http://localhost:8080
# Use Basic Auth (for running tests, CI)
- HTPASSWD_FILE=tests/.htpasswd
- LOG_LEVEL=${LOG_LEVEL:-debug}
# Use the LOG_LEVEL set in the host environment, or default to info
- LOG_LEVEL=${LOG_LEVEL:-info}
- AWS_REGION=us-east-1
# Use the LocalStack endpoint vs. AWS for S3 AWS SDK clients.
# NOTE: we use Docker's internal network to the localstack container
- AWS_S3_ENDPOINT_URL=http://localstack:4566
# Use the DynamoDB local endpoint vs. AWS for DynamoDB AWS SDK clients.
Expand All @@ -15,23 +27,38 @@ services:
# something else is defined in the env.
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME:-fragments}
- AWS_DYNAMODB_TABLE_NAME=${AWS_DYNAMODB_TABLE_NAME:-fragments}
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_SECRET_TOKEN=test
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-test}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-test}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN:-test}
- AWS_DYNAMODB_TABLE_NAME=${AWS_DYNAMODB_TABLE_NAME:-fragments}
# Ports to publish
ports:
- '8080:8080'

# DynamoDB Local, see: https://hub.docker.com/r/amazon/dynamodb-local
dynamodb-local:
image: amazon/dynamodb-local
ports:
# Default port is 8000
- '8000:8000'
# Run the database in memory, see:
# https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html
command: ['-jar', 'DynamoDBLocal.jar', '-inMemory']

# LocalStack for S3, see https://docs.localstack.cloud/get-started/#docker-compose
# Interact via awscli-local, see https://docs.localstack.cloud/integrations/aws-cli/#installation
localstack:
# https://hub.docker.com/r/localstack/localstack
image: localstack/localstack
ports:
- '4566:4566'
environment:
# See https://docs.localstack.cloud/localstack/configuration/ and
# https://hub.docker.com/r/localstack/localstack for config details.
# We only want to run S3
- SERVICES=s3
# We're always working in us-east-1
- DEFAULT_REGION=us-east-1
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-test}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-test}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN:-test}
16 changes: 16 additions & 0 deletions fragments-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
"name": "NODE_ENV",
"value": "production"
},
{
"name": "AWS_COGNITO_POOL_ID",
"value": "us-east-1_Lwm3rYNdl"
},
{
"name": "AWS_REGION",
"value": "us-east-1"
},
{
"name": "PORT",
"value": "80"
Expand All @@ -29,6 +37,14 @@
"name": "LOG_LEVEL",
"value": "debug"
},
{
"name": "AWS_COGNITO_CLIENT_ID",
"value": "1cvod9af862m7t8lr8bfmvpk0i"
},
{
"name": "API_URL",
"value": "http://fragments-lb-1354866106.us-east-1.elb.amazonaws.com"
},
{
"name": "HTPASSWD_FILE",
"value": "tests/.htpasswd"
Expand Down

0 comments on commit 949b632

Please sign in to comment.