···11-# vidl-web
11+# Cryp
22Cryptocurrency portfolio tracker
3344-# ToDo
55-- Empty
66-77-# Get started
88-- **CRYP_ENV** environment variable in docker-compose.yml
99- - Dev: **dev**
1010- - Production: **production**
1111-- Fill in your Google API Client ID and Client Secret in web/src/modules/keys.js. To get that:
44+### Get Started
55+- Install Docker Compose if you do not already have it.
66+- Set your environment variables in `environment.env`. This assumes your server only uses *one* domain.
77+ - `CRYP_ENV`: `dev` or `production`.
88+ - `CERT_DOMAIN`: Set this to your domain name.
99+ - `CERT_EMAIL`: The email your TLS certficiate will be registered with.
1010+- Create the file `web/node/keys.js`, and fill in your Google API Client ID and Client Secret in it. To get those:
1211 1. Go to the [APIs section of GCP](https://console.cloud.google.com/apis/credentials) and create a project, then select it.
1312 2. Click "Create credentials" and "OAuth client ID".
1414- 3. 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, replacing "localhost" with your own domain name.
1313+ 3. 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, replacing `localhost` with your own domain name and `http` with `https`.
1514 4. Press "Create", and you'll be presented with your client ID and secret.
16151716 Your keys.js file should have this format:
···2322 }
2423 }
2524 ```
2525+2626+### Usage
2727+- Register TLS certificate: `docker-compose up letsencrypt-init`.
2828+- Renew TLS certificate: `docker-compose up letsencrypt-renew`.
2929+- Start server: `docker-compose up web mongo-express`. Exclude `mongo-express` in production.