Leverage docker-compose to boot up the service and set a DYNAMODB_URL
as an Env var. As described in the AWS Ruby SDK we can pass in a custom endpoint
to the client.
client = Aws::DynamoDB::Client.new(endpoint: ENV['DYNAMODB_URL'])
Leverage docker-compose to boot up the service and set a DYNAMODB_URL
as an Env var. As described in the AWS Ruby SDK we can pass in a custom endpoint
to the client.
client = Aws::DynamoDB::Client.new(endpoint: ENV['DYNAMODB_URL'])
version: '2' | |
services: | |
dynamodb: | |
image: tray/dynamodb-local | |
ports: | |
- "8000" | |
command: -inMemory -port 8000 | |
test: | |
build: | |
context: . | |
args: | |
BUNDLE_GROUPS: default development test | |
command: bin/rspec | |
links: | |
- dynamodb | |
environment: | |
DYNAMODB_URL: http://dynamodb:8000/ | |
RACK_ENV: test |
Hi,
That looks interesting, but how does one use it from a .travis.yml file?