diff --git a/docs/deploy.md b/docs/deploy.md index b9d65d512..481495953 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -1,24 +1,30 @@ # Deploying OpenDC - -### Preamble - +This document explains how you can deploy OpenDC in your local environment. The official way to run OpenDC is using Docker. Other options include building and running locally, and building and running to deploy on a server. -For all of these options, you have to create a Google API Console project and client ID, which the OpenDC frontend and +## Contents + +1. [Preamble](#preamble) +1. [Installing Docker](#installing-docker) +1. [Running OpenDC from source](#running-opendc-from-source) + +## Preamble + +To run OpenDC, you have to create a Google API Console project and client ID, which the OpenDC frontend and web server will use to authenticate users and requests. Follow [these steps](https://developers.google.com/identity/sign-in/web/sign-in) to make such a project. In the ' Authorized JavaScript origins' and 'Authorized redirect URI' fields, be sure to add `http://localhost:8080` (frontend) , `http://localhost:8081` (api) and `https://localhost:3000` (frontend dev). Download the JSON of the OAuth 2.0 client ID you created from the Credentials tab, and specifically note the `client_id`, which you'll need to build OpenDC. -### Installing Docker +## Installing Docker OpenDC uses [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) to orchestrate the deployment of the software stack. Please refer to [Docker Desktop](https://www.docker.com/products/docker-desktop) for instructions on how install Docker on your machine. -### Running OpenDC +## Running OpenDC from source To build and run the full OpenDC stack locally on Linux or Mac, you first need to clone the project: @@ -45,11 +51,11 @@ OPENDC_OAUTH_CLIENT_ID=your-google-oauth-client-id OPENDC_API_BASE_URL=http://localhost:8081 ``` -We provide a list of default traces for you to experiment with. If you want to add others, place them in the `traces` -directory and add entries to the database (see also [the database folder](database/mongo-init-opendc-db.sh)) +We provide a set of default traces for you to experiment with. If you want to add others, place them in the `traces` +directory and add entries to the database (see also [the database folder](../database/mongo-init-opendc-db.sh)) -If you plan to publicly deploy, please also tweak the other settings. In that case, also check the `docker-compose.yml` -and `docker-compose.pod.yml` for further instructions. +If you plan to deploy publicly, please also tweak the other settings. In that case, also check the `docker-compose.yml` +and `docker-compose.prod.yml` for further instructions. Now, start the server: