puller
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Web interface for Captain's Log Puller application. This is a Rails app with application workers for pulling in data and pushing it to the main CL app. === Requirements - Ruby 2.6.1 - PostgreSQL 10.3 === Development bundle # install dependencies bundle exec rake db:setup # setup database bundle exec spec # run tests bundle exec lint # run linters bundle exec rails s # start the web server process bundle exec rake jobs:work # start the worker process === Configuration The application needs to know what database it should read and write from and where the external services live: CAPTAINSLOG_APPLICATION_URL # example http://localhost:3001 CAPTAINSLOG_REDIRECT_URL # example http://localhost:3000/connection/callback/captainslog DATABASE_URL # example postgres://[email protected]:5432/captainslog FITBIT_CLIENT_ID FITBIT_CLIENT_SECRET FITBIT_REDIRECT_URL # example http://localhost:3000/connection/oauth/fitbit JAEGER_HOST # example localhost JAEGER_PORT # example 6831 LASTFM_API_KEY LASTFM_API_SECRET LASTFM_REDIRECT_URL === Container # Build base image with rails application and all dependencies. Make sure # to run this from the root directory of this repository. docker build -t minond/captainslog-puller-base -f puller/Dockerfile . # Build and run server application. Make sure you have a .env file with # the required environment variables in the directory where you run this # command. docker build -t minond/captainslog-puller-web -f puller/Dockerfile.web . docker run -d --env-file .env --name cl-puller-web -p 8080:3000 minond/captainslog-puller-web # Build and run worker application. docker build -t minond/captainslog-puller-worker -f puller/Dockerfile.worker . docker run -d --env-file .env --name cl-puller-worker minond/captainslog-puller-worker # Push to container repo. docker push minond/captainslog-puller-web:latest docker push minond/captainslog-puller-worker:latest