Skip to content

CiTroNaK/gemstash-on-dokku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gemstash on Dokku

Setup

1. Create a new Dokku app

dokku apps:create gemstash

Example with postgres database:

dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
dokku postgres:create gemstash
dokku postgres:link gemstash gemstash

2. Create persisted storage

dokku storage:ensure-directory gemstash
dokku storage:mount gemstash /var/lib/dokku/data/storage/gemstash:/data

3. Set domain

dokku domains:set gemstash gems.your-domain.com

4. Clone this repo

git clone https://github.com/CiTroNaK/gemstash-on-dokku.git

5. Deploy

git remote add dokku dokku@<dokku-host>:gemstash
git push dokku main:master

Optional steps

1. Set SSL with Let's Encrypt

dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
dokku letsencrypt:set gemstash email you@example.com
dokku letsencrypt:enable gemstash

2. Secure the instance with Basic Auth

dokku plugin:install https://github.com/dokku/dokku-http-auth.git
cd /home/; chmod +x dokku
dokku http-auth:enable gemstash username password

3. Add private gems credentials

On Dokku

Example for storing Sidekiq Pro/Ent credentials:

dokku config:set gemstash GEMSTASH_GEMS__CONTRIBSYS__COM=XXX:YYY

In your app

Set credentials for your Gemstash instance (you should if you want to use it for private gems), e.g. based on the previous step:

bundle config YOUR_GEMSTASH_DOMAIN username:password

Usage in Gemfile:

source "https://rubygems.org"

ruby "3.2.2"

source "https://<YOUR_GEMSTASH_DOMAIN>/upstream/gems.contribsys.com" do
  gem "sidekiq-pro"
end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published