diff --git a/.dockerignore b/.dockerignore index 2b72aa6..df7088c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,12 @@ -.gitea -.vscode -assets .editorconfig -.gitatributes +.gitattributes +.gitea .gitignore .gitlocal +.prettierrc +.vscode +assets +LICENSE +node_modules README.md +renovate.json diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..18f95a9 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,6 @@ +:80 { + root * /arkanum-docs + encode gzip zstd + try_files {path}.html {path} / + file_server +} diff --git a/Dockerfile b/Dockerfile index b279ce6..915f260 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ LABEL org.opencontainers.image.url="https://gitea.ocram85.com/CodeServer/arkanum LABEL org.opencontainers.image.source="https://gitea.ocram85.com/CodeServer/arkanum.git" LABEL org.opencontainers.image.documentation="https://gitea.ocram85.com/CodeServer/arkanum" +#region starship RUN \ echo "**** install starship prompt ****" && \ curl -sS -o /tmp/install.sh https://starship.rs/install.sh && \ @@ -26,15 +27,15 @@ RUN \ echo "eval \"\$(starship init bash)\"" >> /etc/bash.bashrc ENV STARSHIP_CONFIG=/etc/starship.toml - COPY starship.toml /etc/starship.toml +#endregion starship +#region git ADD gitconfig-system /etc/gitconfig RUN \ echo "**** setup git ****" && \ - # using prepared systemwide config file instead. - #git config --system credential.helper store && \ echo 'source /usr/share/bash-completion/completions/git' >> /etc/bash.bashrc +#endregion git ADD arkanum /usr/bin/ ADD arkanum-completion /etc/bash_completion.d/ diff --git a/Dockerfile.vitepress b/Dockerfile.vitepress new file mode 100644 index 0000000..55a6e04 --- /dev/null +++ b/Dockerfile.vitepress @@ -0,0 +1,15 @@ +FROM oven/bun:1 as builder + +USER bun +WORKDIR /app +COPY --chown=bun:bun package*.json bun.lockdb ./ +ENV NODE_ENV=production +RUN bun install --frozen-lockfile --production \ + && bun run --bun docs:build + +FROM caddy:2.7.6-alpine as prod + +COPY --from=builder /app/dist /arkanum-docs/ +COPY Caddyfile /etc/caddy +HEALTHCHECK --interval=15s --timeout=3s \ + CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1 diff --git a/assets/logo512.png b/assets/logo512_old.png similarity index 100% rename from assets/logo512.png rename to assets/logo512_old.png diff --git a/assets/social-logo.png b/assets/social-logo.png index 54bd9db..4de14a2 100644 Binary files a/assets/social-logo.png and b/assets/social-logo.png differ diff --git a/bun.lockb b/bun.lockb index 17260a6..2217890 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docs/.vitepress/sidebar.mjs b/docs/.vitepress/sidebar.mjs index 253ae72..00be14c 100644 --- a/docs/.vitepress/sidebar.mjs +++ b/docs/.vitepress/sidebar.mjs @@ -6,9 +6,19 @@ function getGuide() { return [ { text: 'Guide', + //collapsed: false, items: [ - { text: 'About', link: '/about' }, - { text: 'Getting Started', link: '/getting-started#Quickstart' }, + { text: 'About', link: 'about' }, + { text: 'Getting Started', link: 'getting-started' }, + { + text: 'Components', + items: [ + { text: 'Base Images', link: 'components/base-images' }, + { text: 'Included Packages', link: 'components/packages' }, + { text: 'Starship Prompt', link: 'components/starship' }, + { text: 'Git', link: 'components/git' }, + ], + }, ], }, ] diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index aca7367..1ddb25d 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -50,9 +50,9 @@ --vp-c-default-soft: var(--vp-c-gray-soft); --vp-c-brand-1: #10b981; - --vp-c-brand-2: var(--vp-c-indigo-2); - --vp-c-brand-3: var(--vp-c-indigo-3); - --vp-c-brand-soft: var(--vp-c-indigo-soft); + --vp-c-brand-2: #0e9d6e; + --vp-c-brand-3: #11bc84; + --vp-c-brand-soft: rgba(16, 185, 129, 0.14); --vp-c-tip-1: var(--vp-c-brand-1); --vp-c-tip-2: var(--vp-c-brand-2); @@ -94,14 +94,14 @@ --vp-home-hero-name-color: transparent; --vp-home-hero-name-background: -webkit-linear-gradient( 120deg, - #10b981 30%, - #41d1ff + #41d1ff 30%, + #10b981 ); --vp-home-hero-image-background-image: linear-gradient( -45deg, - #10b981 50%, - #47caff 50% + #47caff 50%, + #10b981 50% ); --vp-home-hero-image-filter: blur(44px); } diff --git a/docs/api-examples.md b/docs/api-examples.md deleted file mode 100644 index 6bd8bb5..0000000 --- a/docs/api-examples.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -outline: deep ---- - -# Runtime API Examples - -This page demonstrates usage of some of the runtime APIs provided by VitePress. - -The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: - -```md - - -## Results - -### Theme Data -
{{ theme }}
- -### Page Data -
{{ page }}
- -### Page Frontmatter -
{{ frontmatter }}
-``` - - - -## Results - -### Theme Data -
{{ theme }}
- -### Page Data -
{{ page }}
- -### Page Frontmatter -
{{ frontmatter }}
- -## More - -Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). diff --git a/docs/guide/components/base-images.md b/docs/guide/components/base-images.md new file mode 100644 index 0000000..986f025 --- /dev/null +++ b/docs/guide/components/base-images.md @@ -0,0 +1,19 @@ +# Base Images + +## Coder/code-server + +Arkanum is build on top of the [code-server](https://github.com/coder/code-server) project. This project +provides the base ability to run VS Code remotely and accessible by any browser instead of the need for a local +installation. + +The folks from [linuxserver.io](https://www.linuxserver.io/) build and maintainer super reliable container images +for all kind of software. And so they also did for the code-server project. + +We also took their [code-server image](https://hub.docker.com/r/linuxserver/code-server) as our base for further +customizing and tailoring arkanum. + +## gitpod-io/openvscode-server + +> [!NOTE] 💬 NOTE +> We plan to also build Arkanum with the openvscode-server base. This could enable us to install Arkanum as +> PWA with our own branding like the product logo. diff --git a/docs/guide/components/git.md b/docs/guide/components/git.md new file mode 100644 index 0000000..04eb572 --- /dev/null +++ b/docs/guide/components/git.md @@ -0,0 +1,52 @@ +# Git + +## 🔱 Config files + +The git configuration is usually done in these 3 different contexts: + +- system wide config + - `/etc/gitconfig` +- global _(per user)_ config + - `~/.gitconfig` +- local _(per repository)_ + - `/.git/config` + +The final config will be merged in this order. + +> [!TIP] 💡 TIP +> You can display the final values with `git config --list` + +## 📄 Included Config + +We already modified the default system config file: + +| Key | Section | Description | +| --------------- | ---------------- | ------------------------------------------------------------------------------------ | +| `editor` | **[core]** | Defines code-server as git edit to open files. | +| `autcrlf` | **[core]** | Disables automatic line ending conversion. Should be handeled by the editor | +| `helper` | **[credential]** | Enables saving plain credentials for git remotes. | +| `filesEncoding` | **[i18n]** | Sets _utf-8_ as default encoding. | +| `default` | **[push]** | Uses _simple_ branch name matching strategy. | +| `lg1` | **[alias]** | Adds alternate log output layout in graph style | +| `lg2` | **[alias]** | Adds extended graph log layout. | +| `cfetch` | **[alias]** | Adds alias for fetch with _--prune_ and _--tags_ . _cfetch_ stands for _clean fetch_ | + +There are also some [Phabricator](https://en.wikipedia.org/wiki/Phabricator) workflow inspired helpers: + +| Key | Section | Description | +| ------------------ | ----------- | ------------------------------------------------------------------------------ | +| `feature ` | **[alias]** | Starts a new feature branch from updates master and checks out the new branch. | +| `wip` | **[alias]** | Stages all current changes and creates a wip _(work in progress)_ commit. | +| `squish` | **[alias]** | Takes all open workdir changes and add them to the latest commit. | +| `pod` | **[alias]** | Tries to push current branch to _origin/dev_. | +| `poc ` | **[alias]** | Takes current branch and tries to push it to a new remote one. | + +::: details **/etc/gitconfig** +<<< @/../gitconfig-system{ini:line-numbers} +::: + +## Git bash Completion + +Git bash completion is already enabled in the arkanum image: + +<<< @/../Dockerfile#git{Dockerfile} diff --git a/docs/guide/components/packages.md b/docs/guide/components/packages.md new file mode 100644 index 0000000..789eb8f --- /dev/null +++ b/docs/guide/components/packages.md @@ -0,0 +1,7 @@ +# Packages + +We already include the following packages while building the Arkanum image: + +| Name | Description | +| ----- | ----------- | +| `git` | Git VCS | diff --git a/docs/guide/components/starship.md b/docs/guide/components/starship.md new file mode 100644 index 0000000..4ffe041 --- /dev/null +++ b/docs/guide/components/starship.md @@ -0,0 +1,5 @@ +# :rocket: Starship Prompt + +## + +<<< @/../Dockerfile#starship{Dockerfile:line-numbers} diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 8f86421..4b81dcf 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -1,15 +1,15 @@ # Getting Started -## Installation +## 🚧 Prerequisites -### Prerequisites +### ⚙️ Container Runtime -Any host with either +You need any host with either - Docker CE / EE running - or Docker-CE and configured 'swarm' mode. -### 1. ⚡ Get the image 📦 +### 📦 Get the image You can download the image from the gitea embedded container registry: `gitea.ocram85.com/codeserver/arkanum` with these tags: @@ -28,7 +28,9 @@ The container images are also published to these registries: - [Codeberg Packages](https://codeberg.org/codeserver/-/packages/container/arkanum/next) - Pull Endpoint: `codeberg.org/codeserver/arkanum` -### 2.a Run as Docker Swarm Stack +## 🏗️ Installation + +### Run as Docker Swarm Stack This example shows how to run arkanum as an additional swarm stack. @@ -86,7 +88,8 @@ networks: ``` > 💡 NOTE: For advanced config with additional environment variables see [linuxserver/docker-code-server](https://github.com/linuxserver/docker-code-server) help. -### 2.b Use Docker-Compose + +### Use Docker-Compose This is a basic example for a `docker-compose` file from the [linuxserver/docker-code-server](https://github.com/linuxserver/docker-code-server) project. @@ -116,7 +119,7 @@ services: restart: unless-stopped ``` -### 3. 🦶 First Steps +## 🦶 First Steps After summon Arkanum your first steps should be to set your username and email in the git config: diff --git a/docs/index.md b/docs/index.md index eb11ddb..9b2e999 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,7 +11,7 @@ hero: alt: Arkanum actions: - theme: brand - text: 🤖 Get Started + text: 🧙 Get Started link: /guide/about - theme: alt text: View on Gitea diff --git a/docs/public/favicon.png b/docs/public/favicon.png index 54bd9db..4de14a2 100644 Binary files a/docs/public/favicon.png and b/docs/public/favicon.png differ diff --git a/docs/public/faviconBg.png b/docs/public/faviconBg.png deleted file mode 100644 index 7c9a5ab..0000000 Binary files a/docs/public/faviconBg.png and /dev/null differ diff --git a/docs/public/logo.png b/docs/public/logo.png index 54bd9db..4de14a2 100644 Binary files a/docs/public/logo.png and b/docs/public/logo.png differ diff --git a/docs/public/logoBg.png b/docs/public/logoBg.png deleted file mode 100644 index 7c9a5ab..0000000 Binary files a/docs/public/logoBg.png and /dev/null differ diff --git a/package.json b/package.json index b2b1517..75852a0 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@types/bun": "latest", "prettier": "^3.1.1", "rimraf": "^5.0.5", - "vitepress": "^1.0.0-rc.42" + "vitepress": "^1.0.0-rc.44" }, "peerDependencies": { "typescript": "^5.0.0"