Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker quickstart to include user auth. Closes #1736 #1737

Merged
merged 2 commits into from
Jun 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion docs/deployment/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,63 @@ 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 <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 <container ID> /bin/bash

and create the admin account

.. code-block:: bash

./bin/deepforge users useradd admin <admin email> <password> -c -s

After setting up DeepForge (with or without user accounts), it can be used by opening a browser to `http://localhost:8888 <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 <https://github.com/deepforge-dev/deepforge/tree/master/.deployment>`_.