Unrecommended: Using on Windows Machine
See docker-compose.yml file
- app
- Hanami application container
- Using Dockerfile in project root.
- mysql
- Database container
- Using official docker image mysql:latest.
- adminer
- Container for managing DB.
- Using official docker image adminer:latest.
git clone [email protected]:Mic-U/hanami-docker-compose-template.git
docker-compose build
docker-compose up -d
Without -d
option, you can see stdout.
docker-compose up
You can use rake or hanami commands on container.
docker-compose run --rm app bundle exec hanami db create
And You can use environment variables.
If you want to set HANAMI_ENV test, run below command.
docker-compose run --rm -e HANAMI_ENV=test app bundle exec hanami db create
Recommend using alias.
docker-compose down