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
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
.astro
.github
node_modules
dist
17 changes: 0 additions & 17 deletions .github/README.md

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on: [push]
name: Build project
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
name: Build project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- run: bun install --frozen-lockfile
- run: bun run build
31 changes: 16 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Dependencies
/node_modules
# build output
dist/
# generated types
.astro/

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
38 changes: 10 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
# Stage 1: Base image.
## Start with a base image containing Bun.
FROM oven/bun:1.2-alpine AS base
## Disable colour output from bun to make logs easier to read.
FROM oven/bun:1.3-alpine AS base
ENV FORCE_COLOR=0
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
WORKDIR /app

# Stage 2a: Development mode.
FROM base AS dev
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the development server.
CMD [ -d "node_modules" ] && bun start --host 0.0.0.0 --poll 1000 || bun install && bun start --host 0.0.0.0 --poll 1000

# Stage 2b: Production build mode.
FROM base AS prod
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Copy over the source code.
COPY . /opt/docusaurus/
## Install dependencies with `--frozen-lockfile` to ensure reproducibility.
WORKDIR /app
COPY . /app
RUN bun install --frozen-lockfile
## Build the static site.
RUN bun run build

# Stage 3a: Serve with `docusaurus serve`.
FROM prod AS serve
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the production server.
CMD ["bun", "serve", "--host", "0.0.0.0", "--no-open"]
FROM nginxinc/nginx-unprivileged:alpine AS serve
USER nginx
RUN rm -f /etc/nginx/conf.d/default.conf
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=prod /app/dist /usr/share/nginx/html
EXPOSE 8080
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 🧭 Compass - Documentation for Sunrise osu! server

<p align="center">
<img src="./.github/readme.png" alt="Artwork made by cafetakki_uma. We don't own the rights to this image.">
</p>

### Overview

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.

### Getting Started

Please refer to live documentation at [docs.sunrize.uk](https://docs.sunrize.uk) for the most up-to-date information.

### Contributing

If you want to contribute to the documentation, please feel free to!
60 changes: 60 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import mermaid from 'astro-mermaid';
import starlightThemeRapide from 'starlight-theme-rapide'

// https://astro.build/config
export default defineConfig({
site: 'https://docs.sunrize.uk',
integrations: [
starlight({
favicon: '/favicon.svg',
title: 'Sunrise - osu! Server',
logo: {
src: '/public/favicon.svg',
alt: 'Sunrise Compass',

},
tableOfContents: {
maxHeadingLevel: 4,
},
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/SunriseCommunity/Compass' },
{
icon: 'discord',
label: 'Discord',
href: 'https://discord.sunrize.uk',
},
{
icon: 'rocket',
label: 'Server Instance',
href: 'https://sunrize.uk',
}
],
sidebar: [
{
label: 'Getting started',
autogenerate: { directory: 'getting-started' },
},
{
label: 'Upgrading',
autogenerate: { directory: 'upgrading' },
},
{
label: 'Contributing', link: "/contributing/"
},
{
label: 'Deprecated',
collapsed: true,
autogenerate: { directory: 'deprecated' },
},
],
plugins: [starlightThemeRapide()],
customCss: [
'./src/styles/custom.css'
],
}),
mermaid()
],
});
Loading