Web Application. Does time tracking for IHK trainees who need to print a report of their weekly progress and activities. Made with Ruby and Rails. Runs on Heroku.
Fork and deploy to your own Heroku account to use.
Free Postgres database on Heroku is limited to 10000 rows.
required environment variables:
TASKR_DATABASE_USERNAME
TASKR_DATABASE_PASSWORD
SECRET_KEY_BASE_DEVELOPMENT
SECRET_KEY_BASE_TEST
SECRET_KEY_BASE
run:
source .env
bundle exec rails s
the heroku postgres database is limited to 10000 rows.
postgres version should be: 9.5.5
get info about postgres from heroku:
heroku pg:info --app task-r
get info on the local postgres database version:
psql -V
connect to the local postgres database and list all databases:
sudo su postgres
(enter your sudo password)
psql
\l
create user with password and alter roles:
CREATE USER nd WITH PASSWORD 'db_password';
ALTER ROLE nd WITH CREATEROLE;
ALTER ROLE nd WITH CREATEDB;
change database owner to new user:
ALTER DATABASE db_name OWNER TO new_owner;
if it exists, drop the local database before pulling from heroku:
DROP DATABASE "taskR_development";
\q
exit
and backup the production database from heroku to your local postgres database:
source .env
PGUSER=`echo $TASKR_DATABASE_USERNAME` PGPASSWORD=`echo $TASKR_DATABASE_PASSWORD` heroku pg:pull DATABASE taskR_development --app task-r
(enter your heroku credentials: email and password)
(note: i think you can push from local to production with the same command, just change pull to push)
deploy changes from master to heroku:
git push heroku master
deploy changes from branch to heroku (bad practice!):
git push heroku branchname:master
deploy migrations on heroku:
heroku run rake db:migrate --app task-r