Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install Staytus with Dokku #377

Open
cbldev opened this issue Nov 2, 2021 · 0 comments
Open

How to install Staytus with Dokku #377

cbldev opened this issue Nov 2, 2021 · 0 comments

Comments

@cbldev
Copy link

cbldev commented Nov 2, 2021

Hello,

Today, I did a fresh deployment of Staytus with Dokku, an open-source small PaaS implementation.
I faced some difficulties, here a small documentation on how to built it on Dokku.

1. I installed Dokku on a fresh server with PostgreSQL and Let's Encrypt plugins for SSL support.

2. I switched the application to PostgreSQL :

  • I did configuration for a new config/database.yml file
  • I removed config/database.yml from .gitignore
  • I removed the mysql gem from Gemfile
  • I added the pg gem to Gemfile
  • I changed the db/schema.rb file by removing the options on all tables, as these options are for MySQL only

3. I removed the Dockerfile from the repository.

4. I created the Dokku application, database and linked them.

5. I configured these environments variables for the application on the Dokku server :

  • FORCE_SSL
  • SECRET_KEY_BASE
  • STAYTUS_DEMO
  • STAYTUS_SMTP_HOSTNAME
  • STAYTUS_SMTP_PASSWORD
  • STAYTUS_SMTP_USERNAME
  • STAYTUS_THEME

6. I configured the application domain and Let's Encrypt SSL certificate with Dokku.

7. I updated the BCrypt gem to to be able to create the first admin user.

8. I pushed to my Dokku server.

9. I ran the install commands inside my container.

bundle exec rake staytus:build staytus:install

10. I enjoyed!

If some people are interested in a more complete documentation on a fork or a PR, feel free to say it there!

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant