Drupal is an open-sourced PHP-based content management system. It is very easy to extend and customize because of its modular structure.
Heroku is a great cloud hosting platform. At the beginning it only supported Ruby on Rails framework. Now it also supports PHP, NodeJS, Scala, Python, Java and Clojure. It is great because you can make a full-fledged live website in minute at zero cost.
Like with many other web applications, a machine which runs Linux operating system is preferred, and this post will assume you have knowledge of how to configure a local PHP environment. The tools you will use includes git, heroku toolbelt.
Without dragging anymore, here are the steps you need to do:
- Download newest drupal package from the official drupal site
- Extract the file
- Download Composer to the extracted folder
- Get a copy of sample php application from the Get Started with PHP on Heroku
- Copy composer.json and composer.lock in the sample app to your drupal folder
- Modify composer.json, delect default modules and add ext-gb and ext-mbstring module to require field
- Run php composer.phar update
- Run heroku create –http-git to make a new Heroku app
- Rename the new app by heroku apps:rename newname –app oldname
- Add heroku to git remote ropository by heroku git:remote -a yourapp (this step is only necessary when heroku complains it’s not a remote ropository)
- Run heroku addons:add heroku-postgresql:hobby-dev to add a PostgreSQL database
- Copy database.setting.php to setting.php in sites/default folder under your drupal folder
- Open you Heroku website, go to your new app, open database setting to see your database information
- Add database information found in last step to setting.php
- Use git push to deploy the site to heroku
Writing may be the simplest way to create. But writing in a foreign language may not be that easy.
Whenever I started to write something I’d always keep looking back at what I’ve just written down. I’d often get stuck and don’t know what to write at a point. It still doesn’t feel natural to me.
One reason could be that I always want to get things done perfectly. When I started to do something, I’d like to see a beautiful result. But it’s always been hard to meet my own expectations. Because of this, it’s become difficult to start to do things. Procrastination became a habit. Efficiency and productivity left me. Creativity is dying inside of me. To tackle this problem, I just need to put my judgmental ego away and focus on little improvements I’ve made. I need to get comfortable with my own imperfection.
Another reason is that I don’t have too much to express. I’m not used to quickly form opinions about things. Throughout my life I’ve never been put to situations that require intense problem solving and imagination. Even if maths problems from school count, I’ve been away from that for a long time. My mind has become rusty and dull. Few things make me excited and passionate nowadays. To tackle this problem, I need to do some mental exercises, especially those can bring satisfaction and stimulation.
The biggest obstacle I’m facing now is my own pessimistic attitude towards self-education. But as long as I can always remind myself to stop second-guessing myself when things don’t go perfectly, maybe I’ll regain confidence and become a better person.
Basically follow this post. There are a few steps you probably need to take:
- Install heroku toolbelt : this one is obvious if you are using a PC
- Install rubyinstaller : I’m not so sure about this one, but if you want to use the bundle install command you’ll need to have the rails environment installed on your local PC
- Use bundle install without rmagick : the rubyinstaller will install a whole bunch of libraries and packages but rmagick. I don’t know how to install it so I just exclude it by bundle install –without rmagick. I suppose if it’s not necessary to build the redmine on your local PC you can just skip these two steps
- Generate SSH public key : heroku requires SSH public key authorization
And that’s it.