How to install Staytus with Dokku
cbldev opened this issue · 0 comments
cbldev commented
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