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
12 changes: 1 addition & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ jobs:
with:
node-version: '24'

- name: Setup Python
uses: actions/setup-python@v5.5.0 # v5.5.0
with:
python-version: '3.13'

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt

- name: Tests
run: |
make test
make astro
47 changes: 12 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
FROM httpd:2.4 AS base

# Set version label
LABEL maintainer="lycheeorg"

# Environment variables
ENV PUID='1000'
ENV PGID='1000'
ENV USER='lychee'
ENV PHP_TZ=UTC

# Multi-stage build: Build static assets
# This allows us to not include Python within the final container
FROM python:3.14-trixie AS python_builder

WORKDIR /usr/src/app

COPY requirements.txt ./
COPY template ./template
COPY utils ./utils
COPY docs ./docs
COPY gen.py .

RUN pip install --no-cache-dir -r requirements.txt && \
mkdir -p dist/docs/ && \
python ./gen.py

# Multi-stage build: Build static assets
# This allows us to not include Node within the final container
FROM node:24 AS node_builder
Expand All @@ -44,14 +17,18 @@ COPY tailwind.config.cjs /app/tailwind.config.cjs
COPY tsconfig.json /app/tsconfig.json

RUN \
npm ci --no-audit && \
npm ci --no-audit --force && \
npm run build

FROM base
COPY --from=node_builder --chown=www-data:www-data /app/dist/ /usr/local/apache2/htdocs/
COPY --from=python_builder --chown=www-data:www-data /usr/src/app/dist/ /usr/local/apache2/htdocs/
FROM httpd:2.4 AS base

# Set version label
LABEL maintainer="lycheeorg"

COPY docs/css /usr/local/apache2/htdocs/docs/css
COPY docs/fonts /usr/local/apache2/htdocs/docs/fonts
COPY docs/img /usr/local/apache2/htdocs/docs/img
COPY docs/js /usr/local/apache2/htdocs/docs/js
# Environment variables
ENV PUID='1000'
ENV PGID='1000'
ENV USER='lychee'
ENV PHP_TZ=UTC

COPY --from=node_builder --chown=www-data:www-data /app/dist/ /usr/local/apache2/htdocs/
61 changes: 58 additions & 3 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { fileURLToPath } from 'url';
import { defineConfig } from 'astro/config';

import { unified } from '@astrojs/markdown-remark';

import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite';
import mdx from '@astrojs/mdx';
import partytown from '@astrojs/partytown';
import icon from 'astro-icon';
import compress from 'astro-compress';
import starlight from '@astrojs/starlight';
import type { AstroIntegration } from 'astro';

import astrowind from './vendor/integration';
Expand All @@ -24,11 +24,63 @@ const whenExternalScripts = (items: (() => AstroIntegration) | (() => AstroInteg
hasExternalScripts ? (Array.isArray(items) ? items.map((item) => item()) : [items()]) : [];

export default defineConfig({
site: 'https://lycheeorg.dev',
output: 'static',

redirects: {
'/docs/': '/docs/getting-started/installation/',
},

integrations: [
sitemap(),
starlight({
title: 'Lychee',
logo: {
src: './src/assets/images/logo.png',
},
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/LycheeOrg/Lychee' },
{ icon: 'discord', label: 'Discord', href: 'https://discord.gg/JMPvuRQcTf' },
],
editLink: {
baseUrl: 'https://github.com/LycheeOrg/LycheeOrg.github.io/edit/master/',
},
customCss: ['./src/styles/starlight.css'],
disable404Route: true,
sidebar: [
{
label: 'Getting Started',
items: [{ autogenerate: { directory: 'docs/getting-started' } }],
},
{
label: 'Usage',
items: [{ autogenerate: { directory: 'docs/usage' } }],
},
{
label: 'Features',
items: [{ autogenerate: { directory: 'docs/features' } }],
},
{
label: 'Supporter Edition',
badge: { text: 'SE', variant: 'tip' },
items: [{ autogenerate: { directory: 'docs/se' } }],
},
{
label: 'Webshop',
badge: { text: 'Pro', variant: 'caution' },
items: [{ autogenerate: { directory: 'docs/webshop' } }],
},
{
label: 'Administration',
items: [{ autogenerate: { directory: 'docs/administration' } }],
},
{
label: 'FAQ',
items: [{ autogenerate: { directory: 'docs/faq' } }],
},
],
}),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
mdx(),
sitemap(),
icon({
include: {
tabler: ['*'],
Expand All @@ -53,7 +105,10 @@ export default defineConfig({
),

compress({
CSS: true,
// csso doesn't understand Tailwind v4's `@media (width >= ...)` range
// syntax and silently drops those blocks, breaking all responsive
// styles in the production build. lightningcss handles it correctly.
CSS: { csso: false, lightningcss: {} },
HTML: {
'html-minifier-terser': {
removeAttributeQuotes: false,
Expand Down
22 changes: 0 additions & 22 deletions docs/architecture.md

This file was deleted.

Loading
Loading