-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
44 lines (44 loc) · 1.25 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
version: '3'
services:
db:
image: mysql:5.6
volumes:
- ./tmp/mysql-roles-docker:/var/lib/mysql
- ./docker-mysql-init.sql:/docker-entrypoint-initdb.d/docker-mysql-init.sql
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
# - MYSQL_USER=roles
# - MYSQL_PASSWORD=roles
# - MYSQL_DATABASE=roles
dynamodb:
image: amazon/dynamodb-local
command: -jar DynamoDBLocal.jar -sharedDb -dbPath /home/dynamodblocal/data/
volumes:
- ./tmp/dynamodb-roles-docker:/home/dynamodblocal/data
web:
build: .
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/usr/src/app
ports:
- "3000:3000"
depends_on:
- db
- dynamodb
environment:
- DB_HOST=db
- DB_USER=roles
- DB_PASSWORD=roles
- DB_NAME=roles
- DB_TEST_HOST=db
- DB_TEST_NAME=roles_test
- DB_TEST_USER=roles
- DB_TEST_PASSWORD=roles
- RACK_ENV=development
- RAILS_ENV=development
- DYNAMODB_ENDPOINT=http://dynamodb:8000
- DYNAMODB_ACTIVITY_LOG_TABLE=roles_activity_log
- DYNAMODB_AWS_ACCESS_KEY=aws_access_key
- DYNAMODB_AWS_SECRET_KEY=aws_secret_key
env_file:
- docker-web-secrets.env