Skip to content

Commit 4f70cd6

Browse files
committed
add documentation
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent a3e39ad commit 4f70cd6

2 files changed

Lines changed: 80 additions & 13 deletions

File tree

docs/installation.rst

Lines changed: 77 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,99 @@ Welcome to the **DejaCode** installation guide! This guide explains how to insta
88
DejaCode on various platforms. Please follow the instructions carefully for a smooth
99
installation experience.
1010

11-
The **recommended DejaCode installation** method is to :ref:`run_with_docker`, which
12-
is the easiest and ensures all features work with minimal configuration.
13-
This installation works on all operating systems.
11+
There are three ways to run DejaCode:
1412

15-
Alternatively, if you prefer, you can install DejaCode locally as a development server
16-
with some limitations.
17-
In this case, you may refer to the :ref:`local_development_installation` section for
18-
more details.
13+
- :ref:`run_with_docker` — **simplest option**, no repository checkout or build step
14+
required. Uses the pre-built Docker image published on GitHub.
15+
- :ref:`run_with_docker_build` — build and run from source using Docker.
16+
Recommended for enterprise deployments.
17+
- :ref:`local_development_installation` — for contributors to DejaCode itself.
1918

2019
.. _run_with_docker:
2120

2221
Run with Docker
2322
===============
2423

24+
This is the simplest way to get DejaCode running. You only need **Docker** —
25+
no repository checkout, no build step required.
26+
2527
1. Get Docker
2628
-------------
2729

28-
Start by downloading and **installing Docker on your platform**.
29-
Refer to Docker's documentation for the best installation path for your system:
30+
Download and **install Docker** on your platform:
3031
|get_docker_link|.
3132

3233
.. |get_docker_link| raw:: html
3334

3435
<a href="https://docs.docker.com/get-docker/" target="_blank" class="external">Get Docker</a>
3536

37+
2. Run the installer
38+
--------------------
39+
40+
Run the one-liner installer::
41+
42+
curl -sSL https://raw.githubusercontent.com/aboutcode-org/dejacode/main/install.sh | bash
43+
44+
This script will:
45+
46+
- Create ``~/.dejacode/`` as the installation directory
47+
- Download ``compose.yml``, ``docker.env``, and the database seed data
48+
- Generate ``.env`` with a secure secret key
49+
- Install the ``dejacode`` command in ``~/.local/bin/``
50+
- Start all services and wait until the application is ready
51+
52+
.. note::
53+
Override the default installation directory with:
54+
``DEJACODE_HOME=/path/to/dir bash install.sh``
55+
56+
3. Create an application user
57+
------------------------------
58+
59+
::
60+
61+
dejacode createsuperuser
62+
63+
Follow the prompt instructions, providing the required information:
64+
65+
- **Username**: Choose a unique username.
66+
- **Email Address**: Provide a valid email address.
67+
- **Strong Password**: Create a password following security guidelines.
68+
69+
4. Access the application
70+
--------------------------
71+
72+
.. admonition:: Congratulations!
73+
:class: tip
74+
75+
Open a web browser and visit |localhost_link| to **access the web UI**.
76+
77+
You can sign-in with the credentials you created above.
78+
79+
You can move onto the Tutorials section starting with the :ref:`user_tutorial_1`.
80+
81+
.. note::
82+
The pre-built image always corresponds to the most recent release and is tagged
83+
``latest``.
84+
85+
.. _run_with_docker_build:
86+
87+
Run with Docker — build from source
88+
=====================================
89+
90+
This method builds the Docker image locally from the DejaCode source repository.
91+
It is the recommended approach for enterprise deployments.
92+
93+
1. Get Docker
94+
-------------
95+
96+
Start by downloading and **installing Docker on your platform**.
97+
Refer to Docker's documentation for the best installation path for your system:
98+
|get_docker_link2|.
99+
100+
.. |get_docker_link2| raw:: html
101+
102+
<a href="https://docs.docker.com/get-docker/" target="_blank" class="external">Get Docker</a>
103+
36104
2. Build the image
37105
------------------
38106

install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -euo pipefail
55

66
REPO="https://raw.githubusercontent.com/aboutcode-org/dejacode/compose-files"
7-
INSTALL_DIR="${DEJACODE_HOME:-$HOME/dejacode}"
7+
INSTALL_DIR="${DEJACODE_HOME:-$HOME/.dejacode}"
88
BIN_DIR="$HOME/.local/bin"
99
WRAPPER="$BIN_DIR/dejacode"
1010

@@ -37,9 +37,8 @@ curl -sSL "$REPO/docker.env" -o docker.env
3737
# ── Generate .env with a secure secret key ────────────────────────────────────
3838
info "Generating .env"
3939
SECRET_KEY=$(LC_ALL=C tr -dc 'A-Za-z0-9!@#%^&*(-_=+)' < /dev/urandom | head -c 50)
40-
cat > .env <<EOF
41-
SECRET_KEY=$SECRET_KEY
42-
EOF
40+
printf 'SECRET_KEY=%s\nALLOWED_HOSTS=localhost\nCSRF_TRUSTED_ORIGINS=http://localhost\n' \
41+
"$SECRET_KEY" > .env
4342

4443
# ── Install wrapper command ───────────────────────────────────────────────────
4544
info "Installing dejacode command to $WRAPPER"

0 commit comments

Comments
 (0)