Skip to content

Commit d3be959

Browse files
authored
Update docker quickstart to include user auth. Closes #1736 (#1737)
* Update docker quickstart to include user auth * Fix code block
1 parent aacd325 commit d3be959

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

docs/deployment/quick_start.rst

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,63 @@ Next, download the docker-compose file for DeepForge:
88
99
wget https://raw.githubusercontent.com/deepforge-dev/deepforge/master/docker/docker-compose.yml
1010
11+
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.
12+
13+
Without User Accounts
14+
---------------------
15+
Open the docker-compose file and add the following environment variable to the server:
16+
17+
.. code-block:: bash
18+
19+
NODE_ENV=default
20+
21+
and delete the volume for the server's keys (used for signing JWTs):
22+
23+
.. code-block:: bash
24+
25+
- "${TOKEN_KEYS_DIR}:/token_keys"
26+
27+
Next, start the docker containers with
28+
29+
.. code-block:: bash
30+
31+
docker-compose up
32+
33+
User Authentication Enabled
34+
---------------------------
35+
First, generate a public and private key pair
36+
37+
.. code-block:: bash
38+
39+
mkdir -p deepforge_keys
40+
openssl genrsa -out deepforge_keys/private_key
41+
openssl rsa -in deepforge_keys/private_key -pubout > deepforge_keys/public_key
42+
export TOKEN_KEYS_DIR="$(pwd)/deepforge_keys"
43+
1144
Then start DeepForge using docker-compose:
1245

1346
.. code-block:: bash
1447
1548
docker-compose up
1649
17-
and now DeepForge can be used by opening a browser to `http://localhost:8888 <http://localhost:8888>`_!
50+
Finally, create the admin user by connecting to the server's docker container. First, get the ID of the container using:
51+
52+
.. code-block:: bash
53+
54+
docker ps
55+
56+
Then, connect to the running container:
57+
58+
.. code-block:: bash
59+
60+
docker -it exec <container ID> /bin/bash
61+
62+
and create the admin account
63+
64+
.. code-block:: bash
65+
66+
./bin/deepforge users useradd admin <admin email> <password> -c -s
67+
68+
After setting up DeepForge (with or without user accounts), it can be used by opening a browser to `http://localhost:8888 <http://localhost:8888>`_!
1869

1970
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>`_.

0 commit comments

Comments
 (0)