Cryptocurrency portfolio tracker (unfinished)
-
Install Docker Compose if you do not already have it.
-
Set your environment variables in
environment.env
. This assumes your server only uses one domain.CRYP_ENV
:dev
orproduction
.CERT_DOMAIN
: Set this to your domain name.CERT_EMAIL
: The email your TLS certficiate will be registered with.
-
Create the file
web/node/keys.js
, and fill in your Google API Client ID and Client Secret in it. To get those:- Go to the APIs section of GCP and create a project, then select it.
- Click "Create credentials" and "OAuth client ID".
- The Application type should be Web application. Now add your Authorized redirect URIs. Add
http://localhost/auth/google/callback
for local development and add another one for production, replacinglocalhost
with your own domain name andhttp
withhttps
. - Press "Create", and you'll be presented with your client ID and secret.
Your keys.js file should have this format:
module.exports = { google: { clientID: "", clientSecret: "" } }
- Register TLS certificate:
docker-compose up letsencrypt-init
. - Renew TLS certificate:
docker-compose up letsencrypt-renew
. - Start server:
docker-compose up web mongo-express
. Excludemongo-express
in production.