-
Notifications
You must be signed in to change notification settings - Fork 61
Setup without Docker
Instructions for using the Action Center without Docker are archived here. These instructions are not actively maintained.
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:
- Create a file called
.env
in the root directory of the project. - 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
. - Replace colons with equal signs, ex.
storage = s3
. - Fill in the environment variables.
Install system package dependencies (the below example works on Ubuntu/precise). You need postresql 9.3 at least.
# On Ubuntu/precise:
$ sudo apt-get install postgresql postgresql-contrib-9.3 libpq-dev libqt4-dev libqtwebkit-dev nodejs
# On OSX:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Skip this step if you have Homebrew
$ brew install postgresql; initdb /usr/local/var/postgres -E utf8
$ brew install postgis; brew install [email protected]; echo 'export PATH="$(brew --prefix [email protected])/bin:$PATH"' >> ~/.bashrc; brew install node
# start postgres: details at https://www.postgresql.org/docs/9.4/static/app-pg-ctl.html
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
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; \""
$ ruby -v
gem install bundler # skip this if you have bundler
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.
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]]
Follow these instructions
https://www.digitalocean.com/community/articles/how-to-install-rails-and-nginx-with-passenger-on-ubuntu