-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (47 loc) · 2.21 KB
/
docker-compose.yml
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
services:
# Fragments microservice API server
fragments:
init: true
# Build the Docker Image using the Dockerfile and use current directory as the build context
build: .
# Environment variables
environment:
- API_URL=http://localhost:8080 # API is running on http://localhost:8080
- HTPASSWD_FILE=tests/.htpasswd # Use Basic Auth (for running tests, CI)
- LOG_LEVEL=${LOG_LEVEL:-debug}
- 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.
- AWS_DYNAMODB_ENDPOINT_URL=http://dynamodb-local:8000
# This S3 bucket and DynamoDB table need to get created first, see local-aws-setup.sh.
# default to 'fragments' as the name, unless 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=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
# Ports to publish
ports:
- '8080:8080'
# DynamoDB Local, see: https://hub.docker.com/r/amazon/dynamodb-local
dynamodb-local:
image: amazon/dynamodb-local
ports:
- '8000:8000'
# Run the database in memory, see:
# https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html
command: ['-jar', 'DynamoDBLocal.jar', '-inMemory', '-sharedDb']
# 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.
- SERVICES=s3
- DEFAULT_REGION=us-east-1