This repository was archived by the owner on Feb 2, 2021. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork0
Generate Docker Compose Files
License
NotificationsYou must be signed in to change notification settings
jwhitcraft/dockercompose-generator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Generate a Docker-Compose Yaml file
Add this line to your application's Gemfile:
gem'dockercompose-generator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dockercompose-generator
generator=DockerCompose::Generatormysql=generator.create_service('db','mysql:5.6')mysql.add_environment('mysql_root_password','root')mysql.add_environment('mysql_database','test')mysql.add_environment('mysql_user','test')mysql.add_environment('mysql_password','test')elastic=generator.create_service('elastic','elasticsearch:1.4')web=generator.create_service('web','php:5.6-apache')web.add_link(elastic)web.add_link(mysql,'mysql')putsgenerator.to_yaml
will output
db:image:mysql:5.6environment:MYSQL_ROOT_PASSWORD:rootMYSQL_DATABASE:testMYSQL_USER:testMYSQL_PASSWORD:testelastic:image:elasticsearch:1.4web:image:php:5.6-apachelinks: -elastic -db:mysql
Support more options thanlinks
,ports
, andenvironment
variablesAdd an Importer to seed the services
- Fork it (https://github.com/jwhitcraft/dockercompose-generator/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
About
Generate Docker Compose Files
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published