From d9d7876919b51739d65774695713606f90641c12 Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Tue, 23 Jun 2020 11:48:39 -0500 Subject: [PATCH 1/2] Update docker quickstart to include user auth --- docs/deployment/quick_start.rst | 52 ++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/docs/deployment/quick_start.rst b/docs/deployment/quick_start.rst index e70e2267b..012782c05 100644 --- a/docs/deployment/quick_start.rst +++ b/docs/deployment/quick_start.rst @@ -8,12 +8,62 @@ Next, download the docker-compose file for DeepForge: wget https://raw.githubusercontent.com/deepforge-dev/deepforge/master/docker/docker-compose.yml +Next, you must decide if you would like authentication to be enabled. For production deployments, this is certainly recommended. However, if you just want to spin up DeepForge to "kick the tires", this is certainly not necessary. + +Without User Accounts +--------------------- +Open the docker-compose file and add the following environment variable to the server: + +.. code-block:: bash + + NODE_ENV=default + +and delete the volume for the server's keys (used for signing JWTs): + +.. code-block:: bash + + - "${TOKEN_KEYS_DIR}:/token_keys" + +Next, start the docker containers with + +.. code-block:: bash + + docker-compose up + +User Authentication Enabled +--------------------------- +First, generate a public and private key pair +.. code-block:: bash + + mkdir -p deepforge_keys + openssl genrsa -out deepforge_keys/private_key + openssl rsa -in deepforge_keys/private_key -pubout > deepforge_keys/public_key + export TOKEN_KEYS_DIR="$(pwd)/deepforge_keys" + Then start DeepForge using docker-compose: .. code-block:: bash docker-compose up -and now DeepForge can be used by opening a browser to `http://localhost:8888 `_! +Finally, create the admin user by connecting to the server's docker container. First, get the ID of the container using: + +.. code-block:: bash + + docker ps + +Then, connect to the running container: + +.. code-block:: bash + + docker -it exec /bin/bash + +and create the admin account + +.. code-block:: bash + + ./bin/deepforge users useradd admin -c -s + +After setting up DeepForge (with or without user accounts), it can be used by opening a browser to `http://localhost:8888 `_! For detailed instructions about deployment installations, check out our `deployment installation instructions <../getting_started/configuration.rst>`_ An example of customizing a deployment using docker-compose can be found `here `_. From 632890e5f3758c37cc46b238025f4dd598843ce0 Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Tue, 23 Jun 2020 12:11:44 -0500 Subject: [PATCH 2/2] Fix code block --- docs/deployment/quick_start.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/deployment/quick_start.rst b/docs/deployment/quick_start.rst index 012782c05..81be87d33 100644 --- a/docs/deployment/quick_start.rst +++ b/docs/deployment/quick_start.rst @@ -33,6 +33,7 @@ Next, start the docker containers with User Authentication Enabled --------------------------- First, generate a public and private key pair + .. code-block:: bash mkdir -p deepforge_keys