move to config.yaml file again
This commit is contained in:
parent
f60c79e94c
commit
dc69dec8de
8 changed files with 24 additions and 23 deletions
|
@ -1,4 +1,3 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
config*
|
|
11
Dockerfile
11
Dockerfile
|
@ -2,6 +2,7 @@ FROM node:lts AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
|
COPY config.yaml ./
|
||||||
|
|
||||||
FROM base AS prod-deps
|
FROM base AS prod-deps
|
||||||
RUN npm ci --omit=dev
|
RUN npm ci --omit=dev
|
||||||
|
@ -13,20 +14,12 @@ FROM build-deps AS build
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ARG POCKETBASE_URL
|
|
||||||
ENV POCKETBASE_URL="${POCKETBASE_URL}"
|
|
||||||
ARG PUBLIC_DESCRIPTION
|
|
||||||
ENV PUBLIC_DESCRIPTION="${PUBLIC_DESCRIPTION}"
|
|
||||||
ARG PUBLIC_TITLE
|
|
||||||
ENV PUBLIC_TITLE="${PUBLIC_TITLE}"
|
|
||||||
ARG PUBLIC_USEICONS
|
|
||||||
ENV PUBLIC_USEICONS="${PUBLIC_USEICONS}"
|
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM base AS runtime
|
FROM base AS runtime
|
||||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||||
COPY --from=build /app/dist ./dist
|
COPY --from=build /app/dist ./dist
|
||||||
|
COPY --from=build /app/config.yaml ./config.yaml
|
||||||
|
|
||||||
ARG PORT=4321
|
ARG PORT=4321
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
import Social from "./Social.astro";
|
import Social from "./Social.astro";
|
||||||
import pb from "../lib/pb";
|
import pb from "../lib/pb";
|
||||||
|
import c from "../../config.yaml";
|
||||||
|
|
||||||
const avatarRec = await pb
|
const avatarRec = await pb
|
||||||
.collection("images")
|
.collection("images")
|
||||||
|
@ -13,8 +14,8 @@ const socials = await pb.collection("socials").getFullList();
|
||||||
const config = {
|
const config = {
|
||||||
// icon,
|
// icon,
|
||||||
socials,
|
socials,
|
||||||
title: import.meta.env.PUBLIC_TITLE,
|
title: c.title,
|
||||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
description: c.description,
|
||||||
};
|
};
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
import Social from "./Social.astro";
|
import Social from "./Social.astro";
|
||||||
import pb from "../lib/pb";
|
import pb from "../lib/pb";
|
||||||
|
import c from "../../config.yaml";
|
||||||
|
|
||||||
|
|
||||||
const avatarRec = await pb
|
const avatarRec = await pb
|
||||||
.collection("images")
|
.collection("images")
|
||||||
|
@ -12,15 +14,15 @@ const socials = await pb.collection("socials").getFullList();
|
||||||
const config = {
|
const config = {
|
||||||
icon,
|
icon,
|
||||||
socials,
|
socials,
|
||||||
title: import.meta.env.PUBLIC_TITLE,
|
title: c.title,
|
||||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
description: c.description,
|
||||||
};
|
};
|
||||||
---
|
---
|
||||||
|
|
||||||
<aside>
|
<aside>
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<a href="/">
|
<a href="/">
|
||||||
<!-- {
|
{
|
||||||
config.icon && (
|
config.icon && (
|
||||||
<Image
|
<Image
|
||||||
class={"icon"}
|
class={"icon"}
|
||||||
|
@ -30,7 +32,7 @@ const config = {
|
||||||
height={50}
|
height={50}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
} -->
|
}
|
||||||
<h1 class="font-bold text-2xl pt-4">{config.title}</h1></a
|
<h1 class="font-bold text-2xl pt-4">{config.title}</h1></a
|
||||||
>
|
>
|
||||||
<p class="pt-4">{config.description}</p>
|
<p class="pt-4">{config.description}</p>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
---
|
---
|
||||||
import { Boolify } from "../lib/boolify";
|
import { Boolify } from "../lib/boolify";
|
||||||
|
import c from "../../config.yaml";
|
||||||
|
|
||||||
const { href, text, icon } = Astro.props;
|
const { href, text, icon } = Astro.props;
|
||||||
const useIcons = Boolify(import.meta.env.PUBLIC_USEICONS);
|
const useIcons = Boolify(c.useIcons);
|
||||||
---
|
---
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import Sidebar from "../components/Sidebar.astro";
|
import Sidebar from "../components/Sidebar.astro";
|
||||||
|
|
||||||
import pb from "../lib/pb";
|
import pb from "../lib/pb";
|
||||||
|
import c from "../../config.yaml";
|
||||||
|
|
||||||
const avatarRec = await pb
|
const avatarRec = await pb
|
||||||
.collection("images")
|
.collection("images")
|
||||||
|
@ -20,8 +21,8 @@ const config = {
|
||||||
icon,
|
icon,
|
||||||
socials,
|
socials,
|
||||||
background,
|
background,
|
||||||
title: import.meta.env.PUBLIC_TITLE,
|
title: c.title,
|
||||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
description: c.description,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const prerender = false;
|
export const prerender = false;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import Lightbox from "../components/Lightbox.astro";
|
import Lightbox from "../components/Lightbox.astro";
|
||||||
import Sidebar from "../components/Sidebar.astro";
|
import Sidebar from "../components/Sidebar.astro";
|
||||||
import pb from "../lib/pb";
|
import pb from "../lib/pb";
|
||||||
|
import c from "../../config.yaml";
|
||||||
|
|
||||||
export const prerender = false;
|
export const prerender = false;
|
||||||
|
|
||||||
|
@ -20,8 +21,8 @@ const config = {
|
||||||
icon,
|
icon,
|
||||||
socials,
|
socials,
|
||||||
background,
|
background,
|
||||||
title: import.meta.env.PUBLIC_TITLE,
|
title: c.title,
|
||||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
description: c.description,
|
||||||
};
|
};
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
import pb from "../lib/pb";
|
import pb from "../lib/pb";
|
||||||
|
import c from "../../config.yaml";
|
||||||
|
|
||||||
export const prerender = false
|
export const prerender = false
|
||||||
const backgroundRec = await pb.collection('images').getFirstListItem('useAsBackground=true').catch(() => null);
|
const backgroundRec = await pb.collection('images').getFirstListItem('useAsBackground=true').catch(() => null);
|
||||||
const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgroundRec.file) : null;
|
const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgroundRec.file) : null;
|
||||||
|
@ -15,7 +17,7 @@ const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgrou
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<title>{import.meta.env.PUBLIC_TITLE}</title>
|
<title>{c.title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
Loading…
Add table
Reference in a new issue