-
-
Save olkeene/3b95d961f5dc5bce86e077b037369db4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .docker/.env | |
REDIS_HOST=redis | |
MONGO_HOST=mongo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .docker/db.env | |
MYSQL_ROOT_USER=root | |
MYSQL_ROOT_PASSWORD=password | |
MYSQL_USER=root | |
MYSQL_PASSWORD=password | |
MYSQL_HOST=db | |
MYSQL_DATABASE=app_development |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
app: | |
build: . | |
command: ./bin/startup.sh | |
volumes: | |
- .:/app | |
- bundle:/bundle | |
ports: | |
- '3000:3000' | |
- '4000:4000' | |
env_file: | |
- ./.docker/db.env | |
- ./.docker/.env | |
links: | |
- db | |
- redis | |
- mongo | |
db: | |
image: mysql:5.7 | |
ports: | |
- 3306 | |
env_file: | |
- ./.docker/db.env | |
volumes: | |
- mysql:/var/lib/mysql | |
redis: | |
image: redis:latest | |
volumes: | |
- redis:/data | |
mongo: | |
image: mongo | |
volumes: | |
- mongo:/data/db | |
volumes: | |
bundle: | |
mysql: | |
redis: | |
mongo: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: bundle exec rails s -b 0.0.0.0 -p 3000 -e ${RACK_ENV:-development} | |
react: npm start | |
resque: QUEUE=... bundle exec rake resque:work | |
resque_scheduler: bundle exec rake resque:scheduler | |
sphinx: bundle exec rake ts:start NODETACH=true | |
.... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# tells the bash script to exit whenever anything returns a non-zero return value. | |
set -e | |
./bin/wait-for-mysql.sh | |
# echo "[INFO] Precreate databases..." | |
# rake db:version || bundle exec rake db:setup | |
# echo "[INFO] Running db:migrate..." | |
# rake db:migrate | |
bundle exec foreman start -f Procfile.docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment