-
-
Notifications
You must be signed in to change notification settings - Fork 537
Install Tracks 2.3.0 on Ubuntu 14.04 LTS on AWS with SSL support
ghost-from-the-past edited this page Apr 15, 2021
·
1 revision
Installing Tracks on a clean server (Ubuntu 14.04 LTS) running on Amazon Web Services with a self-signed SSL certificate for a secure HTTPS access.
$ sudo apt-get install thin unzip bundler libsqlite3-dev zlib1g-dev libssl-dev
$ sudo gem uninstall eventmachine
$ sudo gem install eventmachine
$ mkdir tracks
$ cd tracks
$ wget https://github.com/TracksApp/tracks/archive/v2.3.0.zip
$ unzip v2.3.0.zip
$ cd tracks-2.3.0/
- edit Gemfile, comment line:
#gem "mysql2", "~> 0.3.16"
$ cp config/database.yml.tmpl config/database.yml
$ nano config/database.yml
Uncomment the section for sqlite production, delete the other configuraion for production; don't delete the rest
$ cp config/site.yml.tmpl config/site.yml
$ nano config/site.yml
-
change "change-me" in "salt" and "secret_token" to some random value
-
change config.serve_static_assets to true in config/environments/production.rb in order for the images, stylesheets, and javascript files to be served correctly. $ nano config/environments/production.rb
$ bundle install
$ bundle exec rake assets:precompile RAILS_ENV=production
- generate certificates, e.g. in /home/ubuntu/certificates
$ openssl req -newkey rsa:2048 -nodes -keyout key.pem -out req.pem
$ openssl x509 -req -days 365 -in req.pem -signkey key.pem -out cert.pem
$ bundle exec thin start -e production --ssl --ssl-verify --ssl-key-file /home/ubuntu/certificates/key.pem --ssl-cert-file /home/ubuntu/certificates/cert.pem