Skip to content

Setup without Docker

V Brown edited this page Sep 21, 2016 · 7 revisions

Instructions for using the Action Center without Docker are archived here. These instructions are not actively maintained.

Environment-specific Configuration

Secrets should be loaded into Rails application using environment variables. When running the Action Center in Docker, environment variables are set in docker-compose.yml.

To run the Action Center without Docker, set the environment variables using the included dotenv gem:

  1. Create a file called .env in the root directory of the project.
  2. Copy the environment variables from the docker-compose.yml.example file. The environment variables are marked by ## Start of application environment variables and ## End of application environment variables.
  3. Replace colons with equal signs, ex. storage = s3.
  4. Fill in the environment variables.

Local Setup

Install system package dependencies (the below example works on Ubuntu/precise). You need postresql 9.3 at least.

$  sudo apt-get install postgresql postgresql-contrib-9.3 libpq-dev libqt4-dev libqtwebkit-dev

For convenience, you may configure a postgresql superuser, and then run the below commands to bring the app online.

$  sudo -u postgres bash -c "psql -c \"CREATE ROLE actioncenter PASSWORD 'CHANGEMEinproduction6f799ae4eb3d59e' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN; \""

$  bundle install
   rake db:create
   rake db:schema:load
   rails server

Once the server is running, navigate to localhost:3000/register and create yourself a user account. You will need to provide (and confirm) a valid email in order to log in. When that's done, promote yourself to be an admin using the following command:

rake users:add_admin[[email protected]]

Now you should be able to go to localhost:3000/admin/action_pages to create your first action page.

Heroku Setup

First create a new app and configure it with a Postgres add on. Then

git remote add heroku [email protected]:your-action-center-app.git
git push heroku master
heroku run rake db:migrate

As with above, you can now register a user account and confirm your email.

heroku run rake users:add_admin[[email protected]]

Production Setup

Follow these instructions https://www.digitalocean.com/community/articles/how-to-install-rails-and-nginx-with-passenger-on-ubuntu

Clone this wiki locally