mirror of
https://github.com/TracksApp/tracks.git
synced 2026-04-02 02:17:18 +02:00
Created Installing Tracks 2.3.0 on Ubuntu 14.04 LTS on AWS with SSL support (markdown)
parent
f13cc3d9f4
commit
7655798216
1 changed files with 77 additions and 0 deletions
|
|
@ -0,0 +1,77 @@
|
|||
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.
|
||||
|
||||
## Install all required dependencies
|
||||
|
||||
```
|
||||
$ sudo apt-get install thin unzip bundler libsqlite3-dev zlib1g-dev libssl-dev
|
||||
```
|
||||
|
||||
## Rebuild eventmachine with SSL support
|
||||
|
||||
```
|
||||
$ sudo gem uninstall eventmachine
|
||||
$ sudo gem install eventmachine
|
||||
```
|
||||
|
||||
## Download tracks (2.3.0)
|
||||
|
||||
```
|
||||
$ 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/
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Disable mysql backend
|
||||
|
||||
* edit Gemfile, comment line:
|
||||
```
|
||||
#gem "mysql2", "~> 0.3.16"
|
||||
```
|
||||
|
||||
### Update configuration file
|
||||
```
|
||||
$ 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
|
||||
|
||||
### Update site file
|
||||
```
|
||||
$ 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 (in tracks-2.3.0 folder)
|
||||
|
||||
```
|
||||
$ bundle install
|
||||
```
|
||||
|
||||
## Precompile assets
|
||||
|
||||
```
|
||||
$ bundle exec rake assets:precompile RAILS_ENV=production
|
||||
```
|
||||
|
||||
## [Optional; if you don't have SSL certificate]
|
||||
|
||||
* 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
|
||||
```
|
||||
|
||||
## Run tracks with thin + ssl (in tracks-2.3.0 folder)
|
||||
|
||||
```
|
||||
$ 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
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue