Skip to content

Commit

Permalink
Merge pull request olacabs#2 from treasure-data/cleanup_docker_compose
Browse files Browse the repository at this point in the history
Cleanup docker compose
  • Loading branch information
superdaigo committed Jun 15, 2017
2 parents b72cd08 + 8ddfccf commit 8e33b4e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ sh ./docker-build.sh SingleUser
do signup for access

## Restarting Jackhammer

__Caution: This operation removes all data.__
```
docker-compose stop
docker-compose rm
Expand Down
79 changes: 34 additions & 45 deletions docker-compose.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
version: '3'
volumes:
# We'll define a volume that will store the data from the mysql databases:
mysql-data:
driver: local
services:
mysqldb:
image: mysql
container_name: jackhammer-db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: jackhammer_production
ports:
- "3306:3306"
volumes:
- mysql-data:/usr/local/bin/mysql
restart: always
healthcheck:
test: "nc -z localhost 3306"
interval: 1s
retries: 120
web:
build: ./web
volumes:
- '.:/jackhammer'
ports:
- "5000:3000"
command: bash -c "bundle exec sidekiq -C config/sidekiq.yml -d && bundle exec puma -e production -b tcp://0.0.0.0:3000"
environment:
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=454ab84a2554a5e715db90c7560a06d8a20811d614e7313de05495ecdeac9614c4c3d263df1a5892b92d6c32ea06d4defbd2492c598e8295f89b8b316db25842
- RAILS_SERVE_STATIC_FILES=true
- RAILS_ENV=production
- MYSQL_DB=jackhammer_production
- MYSQL_HOST=mysqldb
- MYSQL_USER=root
- MYSQL_PASSWORD=root
links:
- mysqldb:mysqldb
- redis:redis
depends_on:
- mysqldb
- redis
redis:
image: redis
ports:
- "6379"
mysqldb:
image: mysql
container_name: jackhammer-db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: jackhammer_production
ports:
- "3306:3306"
web:
build: ./web
volumes:
- '.:/jackhammer'
ports:
- "5000:3000"
command: bash -c "bundle exec sidekiq -C config/sidekiq.yml -d && bundle exec puma -e production -b tcp://0.0.0.0:3000"
environment:
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=454ab84a2554a5e715db90c7560a06d8a20811d614e7313de05495ecdeac9614c4c3d263df1a5892b92d6c32ea06d4defbd2492c598e8295f89b8b316db25842
- RAILS_SERVE_STATIC_FILES=true
- RAILS_ENV=production
- MYSQL_DB=jackhammer_production
- MYSQL_HOST=mysqldb
- MYSQL_USER=root
- MYSQL_PASSWORD=root
links:
- mysqldb:mysqldb
- redis:redis
depends_on:
- mysqldb
- redis
redis:
image: redis
ports:
- "6379"

0 comments on commit 8e33b4e

Please sign in to comment.