-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
58 lines (41 loc) · 2.12 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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