Skip to content

Commit 49ae1e2

Browse files
authored
Merge pull request #5 from SunriseCommunity/feat/migrate-to-starlight
2 parents 07337c9 + 24fbebd commit 49ae1e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+918
-2797
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
.astro
3+
.github
4+
node_modules
5+
dist

.github/README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on: [push]
2+
name: Build project
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
jobs:
8+
tests:
9+
name: Build project
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: oven-sh/setup-bun@v2
14+
15+
- run: bun install --frozen-lockfile
16+
- run: bun run build

.gitignore

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
# Dependencies
2-
/node_modules
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
35

4-
# Production
5-
/build
6-
7-
# Generated files
8-
.docusaurus
9-
.cache-loader
10-
11-
# Misc
12-
.DS_Store
13-
.env.local
14-
.env.development.local
15-
.env.test.local
16-
.env.production.local
6+
# dependencies
7+
node_modules/
178

9+
# logs
1810
npm-debug.log*
1911
yarn-debug.log*
2012
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

Dockerfile

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,16 @@
1-
# Stage 1: Base image.
2-
## Start with a base image containing Bun.
3-
FROM oven/bun:1.2-alpine AS base
4-
## Disable colour output from bun to make logs easier to read.
1+
FROM oven/bun:1.3-alpine AS base
52
ENV FORCE_COLOR=0
6-
## Set the working directory to `/opt/docusaurus`.
7-
WORKDIR /opt/docusaurus
3+
WORKDIR /app
84

9-
# Stage 2a: Development mode.
10-
FROM base AS dev
11-
## Set the working directory to `/opt/docusaurus`.
12-
WORKDIR /opt/docusaurus
13-
## Expose the port that Docusaurus will run on.
14-
EXPOSE 3000
15-
## Run the development server.
16-
CMD [ -d "node_modules" ] && bun start --host 0.0.0.0 --poll 1000 || bun install && bun start --host 0.0.0.0 --poll 1000
17-
18-
# Stage 2b: Production build mode.
195
FROM base AS prod
20-
## Set the working directory to `/opt/docusaurus`.
21-
WORKDIR /opt/docusaurus
22-
## Copy over the source code.
23-
COPY . /opt/docusaurus/
24-
## Install dependencies with `--frozen-lockfile` to ensure reproducibility.
6+
WORKDIR /app
7+
COPY . /app
258
RUN bun install --frozen-lockfile
26-
## Build the static site.
279
RUN bun run build
2810

29-
# Stage 3a: Serve with `docusaurus serve`.
30-
FROM prod AS serve
31-
## Expose the port that Docusaurus will run on.
32-
EXPOSE 3000
33-
## Run the production server.
34-
CMD ["bun", "serve", "--host", "0.0.0.0", "--no-open"]
11+
FROM nginxinc/nginx-unprivileged:alpine AS serve
12+
USER nginx
13+
RUN rm -f /etc/nginx/conf.d/default.conf
14+
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
15+
COPY --from=prod /app/dist /usr/share/nginx/html
16+
EXPOSE 8080

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 🧭 Compass - Documentation for Sunrise osu! server
2+
3+
<p align="center">
4+
<img src="./.github/readme.png" alt="Artwork made by cafetakki_uma. We don't own the rights to this image.">
5+
</p>
6+
7+
### Overview
8+
9+
This documentation is built using [Starlight](https://starlight.astro.build/) and serves as the official guide for the [Sunrise osu! server](https://github.com/SunriseCommunity), covering everything from installation to advanced configuration.
10+
11+
### Getting Started
12+
13+
Please refer to live documentation at [docs.sunrize.uk](https://docs.sunrize.uk) for the most up-to-date information.
14+
15+
### Contributing
16+
17+
If you want to contribute to the documentation, please feel free to!

astro.config.mjs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
import mermaid from 'astro-mermaid';
5+
import starlightThemeRapide from 'starlight-theme-rapide'
6+
7+
// https://astro.build/config
8+
export default defineConfig({
9+
site: 'https://docs.sunrize.uk',
10+
integrations: [
11+
starlight({
12+
favicon: '/favicon.svg',
13+
title: 'Sunrise - osu! Server',
14+
logo: {
15+
src: '/public/favicon.svg',
16+
alt: 'Sunrise Compass',
17+
18+
},
19+
tableOfContents: {
20+
maxHeadingLevel: 4,
21+
},
22+
social: [
23+
{ icon: 'github', label: 'GitHub', href: 'https://github.com/SunriseCommunity/Compass' },
24+
{
25+
icon: 'discord',
26+
label: 'Discord',
27+
href: 'https://discord.sunrize.uk',
28+
},
29+
{
30+
icon: 'rocket',
31+
label: 'Server Instance',
32+
href: 'https://sunrize.uk',
33+
}
34+
],
35+
sidebar: [
36+
{
37+
label: 'Getting started',
38+
autogenerate: { directory: 'getting-started' },
39+
},
40+
{
41+
label: 'Upgrading',
42+
autogenerate: { directory: 'upgrading' },
43+
},
44+
{
45+
label: 'Contributing', link: "/contributing/"
46+
},
47+
{
48+
label: 'Deprecated',
49+
collapsed: true,
50+
autogenerate: { directory: 'deprecated' },
51+
},
52+
],
53+
plugins: [starlightThemeRapide()],
54+
customCss: [
55+
'./src/styles/custom.css'
56+
],
57+
}),
58+
mermaid()
59+
],
60+
});

0 commit comments

Comments
 (0)