diff --git a/docs/nix_dev_env.md b/docs/nix_dev_env.md --- a/docs/nix_dev_env.md +++ b/docs/nix_dev_env.md @@ -135,6 +135,7 @@ ## Production workflows +- [Keyserver deployment](./nix_keyserver_deployment.md) - [Services deployment](./nix_services_deployment.md) - [Tunnelbroker](./nix_services_deployment.md#tunnelbroker) diff --git a/docs/nix_keyserver_deployment.md b/docs/nix_keyserver_deployment.md new file mode 100644 --- /dev/null +++ b/docs/nix_keyserver_deployment.md @@ -0,0 +1,48 @@ +# Services Deployment + +## Keyserver + +Deploying the keyserver requires configuring it, building its Docker image, and deploying that image with Docker Compose. + +### Configuration + +Keyserver must interact with several different services as well as hosts the Comm landing page. + +Services which interface with Keyserver: + +- MariaDB: Database used to store much of the information created when using Keyserver. +- Identity Service: Comm service that mints and verifies Comm identities. +- Ethereum: A crypto community centered around the ETH token. ETH wallets can be used to authenticate with Comm. + +Keyserver provides two services: + +- Landing page: Static site for displaying resources about Comm. +- Comm App: Web frontend for the Comm communications application. + +For the keyserver to interface with its dependencies, host the landing page, and host the Comm web application; the following must be added to `keyserver/.env`: + +``` +# Mandatory +COMM_DATABASE_DATABASE=comm +COMM_DATABASE_USER= +COMM_DATABASE_PASSWORD= +COMM_JSONCONFIG_secrets_user_credentials='{"username":"","password":""}' +COMM_JSONCONFIG_facts_landing_url='{"baseDomain":"http://localhost","basePath":"/commlanding/","baseRoutePath":"/commlanding/","https":false}' +COMM_JSONCONFIG_facts_commapp_url='{"baseDomain":"http://localhost:3000","basePath":"/comm/","https":false,"baseRoutePath":"/comm/","proxy":"none"}' + +# Required to connect to production Identity service +COMM_JSONCONFIG_secrets_identity_service_config="{\"identitySocketAddr\":\"https://identity.commtechnologies.org:50054\"}" + +# Required for ETH login +COMM_JSONCONFIG_secrets_alchemy='{"key":""}' +COMM_JSONCONFIG_secrets_walletconnect='{"key":""}' +``` + +### Building & deploying + +Once configured, the keyserver can be built and deployed by simply running: + +```bash +cd keyserver +./bash/dc.sh up --build +``` diff --git a/docs/nix_services_deployment.md b/docs/nix_services_deployment.md --- a/docs/nix_services_deployment.md +++ b/docs/nix_services_deployment.md @@ -1,5 +1,41 @@ # Services Deployment +## Keyserver + +Deploying the keyserver requires configuring it, building its Docker image, and deploying that image with Docker Compose. + +### Configuration + +In order for the keyserver to interact with other services and tools, the following must be added to `keyserver/.env`: + +``` +# Mandatory +COMM_DATABASE_DATABASE=comm +COMM_DATABASE_USER= +COMM_DATABASE_PASSWORD= +COMM_JSONCONFIG_secrets_user_credentials='{"username":"","password":""}' +COMM_JSONCONFIG_facts_landing_url='{"baseDomain":"http://localhost","basePath":"/commlanding/","baseRoutePath":"/commlanding/","https":false}' +COMM_JSONCONFIG_facts_commapp_url='{"baseDomain":"http://localhost:3000","basePath":"/comm/","https":false,"baseRoutePath":"/comm/","proxy":"none"}' +# Production instance +COMM_JSONCONFIG_secrets_identity_service_config="{\"identitySocketAddr\":\"https://identity.commtechnologies.org:50054\"}" + +# Required for ETH Login +COMM_JSONCONFIG_secrets_alchemy='{"key":""}' +COMM_JSONCONFIG_secrets_walletconnect='{"key":""}' + +# Optional +COMM_JSONCONFIG_secrets_geoip_license='{"key":""}' +``` + +### Deploying Keyserver + +Once configured, the keyserver can be deployed by simply running: + +``` +cd keyserver +./bash/dc.sh up --build +``` + ## Tunnelbroker Deploying Tunnelbroker consists of building its Docker image and deploying that image as a Docker container.