Hosting GemInabox with docker
____ _ ____
| _ \ _ _| |__ _ _ / ___| ___ _ __ ___ ___
| |_) | | | | '_ \| | | | | | _ / _ \ '_ ` _ \/ __|
| _ <| |_| | |_) | |_| | | |_| | __/ | | | | \__ \
|_| \_\\__,_|_.__/ \__, | \____|\___|_| |_| |_|___/
|___/
This project is built on top of Geminabox and provide the follwoing featuers for the gem server.
$> bundle install
$> STORE_FORMAT=yaml RACK_ENV=production rackup
$> STORE_FORMAT=yaml RACK_ENV=production bin/console
ldap configs can be found under config/ldap.yml, you can either modfify the file or manage the configs using enviornment variables.
production: &ldap_defaults
hostname: <%= ENV.fetch('LDAP_HOST', '127.0.0.1') %>
basedn: <%= ENV.fetch('LDAP_BASEDN', 'dc=shihadeh,dc=cloud') %>
rootdn: <%= ENV.fetch('LDAP_ROOTDN', 'cn=admin,dc=shihadeh,dc=cloud') %>
passdn: <%= ENV.fetch('LDAP_PASSDN', 'test1234') %>
scope: :subtree
auth: true
port: <%= ENV.fetch('LDAP_PORT', '389') %>
username_ldap_attribut: <%= ENV.fetch('LDAP_USERNAME_LDAP_ATTRIBUT', 'givenName') %>
ldap_group_base: <%= ENV.fetch('LDAP_LDAP_GROUP_BASE', 'ou=Groups,dc=shihadeh,dc=cloud') %>
ldap_group_filter: <%= ENV.fetch('LDAP_LDAP_GROUP_FILTER', '(&(objectClass=groupOfNames)(member={dn}))') %>
ldaps: false
starttls: false
tls_options: nil
http://host/health
.http://host/signup
. The user need to provide ldap credintails and as a result of vaild credintails an api key will be gnerated for the user.http://host//api/v1/api_key
This is used by the gem signin
command line.The user need to provide ldap credintails and as a result of vaild credintails an api key will be gnerated for the user. and it wiill be stored in ~/.gem/credentials
./api/v1/gems
(push gems) and /api/v1/gems/yank
(yank a gem). The Middleware checks if the api key used is allowed to do the operations and take care of updaing/collect the gems metadata.$> IMAGE_TAG=latest make build
docker-compose up -d