Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ jobs:

- name: Check code formatting 🎨
run: node --run format:check

- name: Check types 🧩
run: node --run types:check

- name: Check build 🏗️
run: node --run build
18 changes: 10 additions & 8 deletions content/docs/configuration/env-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ These environment variables can be used in both the agent and the hub.
| ----------- | ------------- | --------------------- | ---------------------------------------------------------- |
| `DEBUG` | `false` | no | Debug mode |
| `LOG_LEVEL` | `info ` | no | Log level. Options: trace, debug, info, warn, error, fatal |
| `LOG_JSON` | `false` | no | Enable JSON formatted logs. |

## Hub

| Variable | Default Value | Recommended to change | Description |
| ------------------ | ------------- | --------------------- | ------------------------------------------------------------------------------------------ |
| `APP_URL` | `-` | yes (required) | The URL of the OrcaCD instance |
| `APP_SECRET` | `-` | yes (required) | Secret used for authentication and encryption. Generate one with `openssl rand -base64 42` |
| `HOST` | `0.0.0.0 ` | no | Host address |
| `PORT` | `8080 ` | no | Container port |
| `DisableLocalAuth` | `false ` | no | Disable password authentication. Useful when using SSO with OIDC |
| `TrustedProxies` | `- ` | no | Recommended if using a reverse proxy. Comma seperated list of network origins |
| Variable | Default Value | Recommended to change | Description |
| -------------------- | ------------- | --------------------- | ------------------------------------------------------------------------------------------------------- |
| `APP_URL` | `-` | yes (required) | The URL of the OrcaCD instance |
| `APP_SECRET` | `-` | yes (required) | Secret used for authentication and encryption. Generate one with `openssl rand -base64 42` |
| `HOST` | `0.0.0.0 ` | no | Host address |
| `PORT` | `8080 ` | no | Container port |
| `DISABLE_LOCAL_AUTH` | `false ` | no | Disable password authentication. Useful when using SSO with OIDC |
| `TRUSTED_PROXIES` | `- ` | no | Recommended if using a reverse proxy. Comma seperated list of network origins |
| `DEMO` | `false ` | no | This mode disables all functions except the login and additionally seeds some demo data in the database |

## Agent

Expand Down
13 changes: 13 additions & 0 deletions content/docs/demo.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Demo
description: Live demo of Orca CD in action, showcasing its features and capabilities.
---

To access the live demo of Orca CD, please visit the following link:

[Live Demo](https://demo.orcacd.com)

The credentials for the demo are as follows:

- Username: `demo@orcacd.dev`
- Password: `demo-password`
41 changes: 39 additions & 2 deletions content/docs/guides/oidc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,45 @@ title: OIDC Authentication
description: Learn how to use OIDC providers for auhentication in OrcaCD
---

TODO:
OrcaCD supports OIDC authentication, allowing users to log in using their existing accounts from various OIDC providers. This guide will walk you through the process of setting up OIDC authentication in OrcaCD.

<Callout title="Disable password login" type="warn">
When using OIDC authentication, you can disable password login to enhance security. This ensures
that users can only log in using their OIDC provider accounts, reducing the risk of unauthorized
access through weak or compromised passwords. Before disabling password login, make sure the OIDC
authentication is properly configured and tested.

To disable password login, set the `DISABLE_LOCAL_AUTH` environment variable. Look at the [environment variables documentation](/docs/configuration/env-variables) for more details.

</Callout>

## Example (Pocket Id)

TODO
To set up OIDC authentication with Pocket Id, follow these steps:

### 1. Create a Pocket Id Application

Go to your Pocket ID dashboard and create a new application. Give it a name and leave the redirect URI blank for now.

TODO: Pocket Id application creation image here

### 2. Configure OrcaCD

1. Go to the OrcaCD Admin settings and navigate to the OIDC configuration section.
2. Create a new OIDC provider configuration with the following details:
- **Name**: A name for your OIDC provider (e.g., "Pocket Id").
- **Issuer URL**: The issuer URL provided by Pocket Id (e.g., `https://pocketid.com`).
- **Client ID**: The client ID from your Pocket Id application.
- **Client Secret**: The client secret from your Pocket Id application.
3. Save the configuration and ensure it is enabled.

TODO: Orca CD OIDC configuration image here

### 3. Test the Configuration

1. Log out of OrcaCD if you are currently logged in.
2. Click on the "Login with Pocket Id" button on the login page.
3. You will be redirected to the Pocket Id login page. Enter your credentials and log in.
4. After successful authentication, you will be redirected back to OrcaCD and logged in with your Pocket Id account.

TODO: Login page image here
24 changes: 23 additions & 1 deletion content/docs/guides/reverse-proxy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,26 @@ TODO

## Traefik

TODO
To use Traefik as a reverse proxy for OrcaCD, you can add the following labels to your Docker Compose configuration for the OrcaCD Hub service:

```yml
services:
hub:
image: ghcr.io/orcacd/hub:latest
container_name: orca-hub
ports:
- "127.0.0.1:8080:8080"
restart: unless-stopped
env_file: .env
labels: // [!code ++]
- "traefik.enable=true" // [!code ++]
- "traefik.http.routers.orcacd.rule=Host(`orcacd.example.com`)" // [!code ++]
volumes:
- ./data/hub:/app/data
```

Now when registering an agent, you can use following URL as the Hub URL:

```
HUB_URL=http://orcacd.example.com
```
62 changes: 61 additions & 1 deletion content/docs/helping-out/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,64 @@ title: Contributing
description: Learn how to contribute to the OrcaCD project
---

TODO
Any contribution is greatly appreciated. You don't need to be a developer to contribute. You can help by translating the app, reporting issues, or simply sharing your ideas for new features.

If you have any questions, please do not hesitate to contact us.

Read our [Code of Conduct](https://github.com/OrcaCD/orca-cd/blob/main/CODE_OF_CONDUCT.md) to keep our community approachable and respectable.

## Security

If you would like to report a security vulnerability, please take a look at [SECURITY.md](https://github.com/OrcaCD/orca-cd/blob/main/SECURITY.md)

## Code contributions

We welcome code contributions and encourage clear, well-documented changes that include appropriate tests.
When introducing a new feature, please ensure you add relevant tests.
For breaking changes or major new features, open an issue beforehand to discuss your proposal with the team.

### Required tools

We use Go and Node.js for the development of the backend and frontend respectively. For a detailed list of required tools and their versions, please refer to the [CONTRIBUTING.md](https://github.com/OrcaCD/orca-cd/blob/main/CONTRIBUTING.md#required-tools) file in the repository.

### Setting up the development environment

1. Install all required tools listed above.
2. Clone the repository and navigate to the project directory.
3. For the frontend, navigate to the `frontend/` directory and run `npm ci` to install dependencies.
4. Run the frontend development server with `node --run dev` from the `frontend/` directory.
5. Run the backend services with `just run-hub` and `just run-agent` in the `backend/` directory.
6. Access the app at `http://localhost:3000` and the hub API at `http://localhost:8080`.

### Running locally with Docker

A Docker Compose file is provided for running the full stack locally:

```sh
docker compose -f docker-compose.dev.yaml up --build
```

The hub service will be available at `http://localhost:8080`.

### Submitting a Pull Request

Before you submit the pull request for review please ensure that

- The pull request naming follows the [Conventional Commits specification](https://www.conventionalcommits.org):

`<type>[optional scope]: <description>`

example:

```yml
fix: hide global audit log switch for non admin users
```

Where `TYPE` can be:
- feat - is a new feature
- doc - documentation only changes
- fix - a bug fix
- refactor - code change that neither fixes a bug nor adds a feature

- Your pull request has a detailed description
- You have added tests for any new features or bug fixes
34 changes: 33 additions & 1 deletion content/docs/helping-out/documentation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,36 @@ title: Documentation
description: Contribute to improving the OrcaCD website or documentation
---

TODO
This guide explains how to add or edit documentation (Fumadocs).

## 1. Where docs live

All markdown pages are under `/content/docs`. The file `meta.json` controls the sidebar structure and order.

## 2. Adding a new page

1. Pick the correct folder that matches a collection pattern (e.g. `/guides`).

2. Create `/content/docs/<section>/<slug>.md`.

3. Add frontmatter:

```yaml
---
title: Installation
description: Get OrcaCD running quickly with Docker installation
---
```

4. Run `npm run dev` and check your page at `http://localhost:3000/docs/<section>/<slug>`.

<Callout title="Components">
To use components in the documentation please look at the [Fumadadocs Documentation for
Markdown](https://www.fumadocs.dev/docs/markdown)
</Callout>

## 3. Submitting changes

After making changes you can create a pull request to the `main` branch. Please make sure to commit using Conventional Commits (`doc: update guides`).

Thanks for helping out!
10 changes: 3 additions & 7 deletions content/docs/helping-out/translating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ Use informal language for translations

1. Visit our [Crowdin project page](https://crowdin.com/project/orca-cd).
2. Choose the language you wish to translate into.
3. Open the `en-US.json` source file.
3. Open the `en.json` source file.
4. Now you can start translating the strings.

## Adding a New Language

TODO: Add language request issue template here

Is your language missing from Crowdin? You can [request its addition](https://crowdin.com/project/orca-cd).
Is your language missing from Crowdin? You can [request its addition](https://github.com/OrcaCD/orca-cd/issues/new?assignees=&labels=language-request&projects=&template=language-request.yml&title=%F0%9F%8C%90+Language+request%3A+%3Clanguage+name+in+english%3E).

## Need Help?

TODO: Add localization discussion

Encountering issues while translating? Join the [Localization discussion](https://crowdin.com/project/orca-cd) to seek help and share experiences.
Encountering issues while translating? Join the [Localization discussion](https://github.com/OrcaCD/orca-cd/discussions/86) to seek help and share experiences.
18 changes: 15 additions & 3 deletions content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ description: Welcome to OrcaCD - A simple service for using gitops with docker
breaking changes at any time.
</Callout>

import { HomeIcon } from "lucide-react";
OrcaCD is a simple GitOps tool for Docker. It allows you to deploy your applications using Git as the source of truth. With OrcaCD, you can easily manage your Docker containers and keep them in sync with your Git repository.

TODO:

TODO: About section (motivation, ...)
- Detailed project description
- Master degree project motivation
- Core components and concepts (hub/agent)

TODO: Image examples
TODO: Image examples (application page, agents page, repositories page)

import { HomeIcon } from "lucide-react";

<Cards>
<Card href="/docs/setup/installation" title="Installation">
Expand All @@ -23,6 +29,12 @@ TODO: Image examples
</Card>
</Cards>

## Get to know OrcaCD

[Try the OrcaCD Demo](/docs/demo)

TODO: demo image or gif here

## Useful Links

- [Installation](/docs/setup/installation)
1 change: 1 addition & 0 deletions content/docs/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"pages": [
"---Getting Started---",
"index",
"demo",
"---[Rocket]Setup---",
"...setup",
"---[Settings]Configuration---",
Expand Down
8 changes: 8 additions & 0 deletions content/docs/setup/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ description: Keep your OrcaCD installation up to date
Before upgrading OrcaCD in production, we strongly recommend creating a backup of your database
and keeping a copy of your current `.env` and `docker-compose.yml` files. This gives you a
rollback path if something goes wrong.

To create a backup of your database, you can copy the `hub.db` file from your docker volumes to a safe location. For example:

```bash
docker compose down
docker cp orca-hub:/data/hub.db ./hub_backup.db
Comment thread
alex289 marked this conversation as resolved.
```

</Callout>

For upgrading OrcaCD when using Docker, you just need to pull the latest image and restart the services:
Expand Down
1 change: 1 addition & 0 deletions public/assets/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions source.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { remarkSteps } from "fumadocs-core/mdx-plugins";
import { defineConfig, defineDocs } from "fumadocs-mdx/config";
import lastModified from "fumadocs-mdx/plugins/last-modified";

Expand All @@ -12,4 +13,7 @@ export const docs = defineDocs({

export default defineConfig({
plugins: [lastModified()],
mdxOptions: {
remarkPlugins: [remarkSteps],
},
});
12 changes: 12 additions & 0 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
BookOpen,
Users,
Heart,
Play,
} from "lucide-react";

export const Route = createFileRoute("/")({
Expand Down Expand Up @@ -85,6 +86,15 @@ function Home() {
<Rocket className="size-4" />
Get Started
</Link>

<Link
to="/docs/$"
params={{ _splat: "demo" }}
className="inline-flex items-center gap-2 rounded-lg bg-fd-secondary px-5 py-2.5 text-sm font-medium text-fd-secondary-foreground transition-opacity hover:opacity-90"
>
<Play className="size-4" />
Demo
</Link>
</div>
</div>
</section>
Expand Down Expand Up @@ -228,6 +238,7 @@ function Home() {
params={{ _splat: "setup/installation" }}
className="inline-flex items-center gap-2 rounded-lg bg-fd-primary px-5 py-2.5 text-sm font-medium text-fd-primary-foreground transition-opacity hover:opacity-90"
>
<BookOpen className="size-4" />
Read Documentation
</Link>
<a
Expand All @@ -236,6 +247,7 @@ function Home() {
rel="noopener noreferrer"
className="inline-flex items-center gap-2 rounded-lg border border-fd-border bg-fd-card px-5 py-2.5 text-sm font-medium text-fd-foreground transition-colors hover:bg-fd-accent"
>
<img src="/assets/icons/github.svg" alt="GitHub" className="size-4 dark:invert" />
View on GitHub
</a>
</div>
Expand Down