Skip to content

Getting Started

Tamas Vince Kornel edited this page Dec 1, 2025 · 7 revisions

This project is fully configured to run inside a Dev Container.

Local setup

First, ensure you have Docker installed on your machine. Both Docker Desktop and Docker Engine are supported.

Tip

On Linux, make sure your user has permission to run Docker commands without sudo. You can achieve this by adding your user to the docker group:

sudo usermod -aG docker $USER

Next, you have two choices, depending on your code editor:

Using Visual Studio Code

Install the Dev Containers extension from the Visual Studio Code Marketplace.

Then, open the Chronos project folder in Visual Studio Code. You should see a prompt to reopen the folder in a Dev Container. Click "Reopen in Container".

In case this doesn't work for you, please open an issue in the Chronos GitHub repository.

Using the CLI

This method is not recommended, as you have to have more runtime dependencies installed on your machine.

First, install bun by following the instructions at https://bun.sh/.

Then, install the Dev Container CLI by running

bun add -g @devcontainers/cli

Important

You may need to restart your terminal or add bun's global binaries to your PATH. Bun should warn you about this after installation.

Finally, navigate to the Chronos project folder in your terminal and run:

devcontainer build --workspace-folder .
devcontainer up --workspace-folder .

You can now edit the project files using your favorite code editor, just open the project folder.

Executing commands inside the Dev Container

devcontainer exec --workspace-folder . -- <command>

Environment Variables

Note

To get Entra values, register an application in your Azure AD tenant. More information can be found in the Entra Setup page.

Before running the application, create a .env file in apps/chronos Use the format shown below:

# apps/chronos.env
CHRONOS_LOG_LEVEL=debug
CHRONOS_BASE_URL=http://localhost:3000
CHRONOS_DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres
# --------------------------------------------------
# | You have to change every value below this line |
# --------------------------------------------------
CHRONOS_AUTH_SECRET=FILL_ME_IN
CHRONOS_ADMIN_EMAIL=your.email.here@petrik.hu
CHRONOS_ENTRA_TENANT_ID=FILL_ME_IN
CHRONOS_ENTRA_CLIENT_ID=FILL_ME_IN
CHRONOS_ENTRA_CLIENT_SECRET=FILL_ME_IN

Generate a random secret

You can generate a random secret for CHRONOS_AUTH_SECRET using the following command:

openssl rand -base64 32 # change 32 to 48 for stronger secret

Running the Project

The Dev Container is pre-configured to run the project in development mode.

Built with ❤️

Clone this wiki locally