i hate docker so much

This commit is contained in:
Lio 2024-07-25 22:55:10 +02:00
parent 71d3afb1d3
commit c7919d0d22
14 changed files with 815 additions and 47 deletions

2
.gitignore vendored
View file

@ -22,5 +22,3 @@ pnpm-debug.log*
# jetbrains setting folder
.idea/
config*

View file

@ -3,12 +3,6 @@ WORKDIR /app
COPY package.json package-lock.json ./
ARG POCKETBASE_URL
ARG PUBLIC_DESCRIPTION
ARG PUBLIC_TITLE
ARG PUBLIC_USEICONS
ENV POCKETBASE_URL=${POCKETBASE_URL}
ENV POCKETBASE_URL=${POCKETBASE_URL}
ENV PUBLIC_DESCRIPTION=${PUBLIC_DESCRIPTION}
ENV PUBLIC_TITLE=${PUBLIC_TITLE}

View file

@ -12,6 +12,6 @@ export default defineConfig({
mode: "standalone",
}),
vite: {
plugins: [yaml()],
plugins: [yaml()]
},
});

View file

@ -1,16 +1,15 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
- POCKETBASE_URL=https://pb.data.lio.systems
- PUBLIC_DESCRIPTION="This is a rather long description to live on the landing and sidebar"
- PUBLIC_TITLE=Phobos.Docker.Gallery
- PUBLIC_USEICONS=true
image: phobos
ports:
- 4321:4321
# environment:
# - PUBLIC_TITLE=Astro Gallery
# - PUBLIC_DESCRIPTION=This is my Gallery Site
# - PUBLIC_USEICONS=true
environment:
- PUBLIC_POCKETBASE=https://pb.data.lio.systems
- PUBLIC_TITLE=Astro Gallery
- PUBLIC_DESCRIPTION=This is my Gallery Site
- PUBLIC_USEICONS=true
# build:
# context: .
# dockerfile: Dockerfile
# args:
# PUBLIC_HOST: http://localhost:4321

779
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,10 +3,10 @@
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "rimraf dist && astro check && astro build",
"preview": "astro preview",
"dev": "dotenvx run -- astro dev",
"start": "dotenvx run -- astro dev",
"build": "astro check && dotenvx run -- astro build",
"preview": "dotenvx run -- astro preview",
"astro": "astro"
},
"dependencies": {
@ -14,6 +14,7 @@
"@astrojs/node": "^8.3.2",
"@astrojs/react": "^3.6.0",
"@astrojs/tailwind": "^5.1.0",
"@dotenvx/dotenvx": "^1.6.4",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"astro": "^4.12.2",

View file

@ -2,6 +2,7 @@
import { Image } from "astro:assets";
import Social from "./Social.astro";
import pb from "../lib/pb";
import c from "../lib/config";
const avatarRec = await pb
@ -14,8 +15,8 @@ const socials = await pb.collection("socials").getFullList();
const config = {
// icon,
socials,
title: import.meta.env.PUBLIC_TITLE,
description: import.meta.env.PUBLIC_DESCRIPTION,
title: c.TITLE,
description: c.DESCRIPTION,
};
---

View file

@ -2,6 +2,7 @@
import { Image } from "astro:assets";
import Social from "./Social.astro";
import pb from "../lib/pb";
import c from "../lib/config";
@ -14,8 +15,8 @@ const socials = await pb.collection("socials").getFullList();
const config = {
icon,
socials,
title: import.meta.env.PUBLIC_TITLE,
description: import.meta.env.PUBLIC_DESCRIPTION,
title: c.TITLE,
description: c.DESCRIPTION,
};
---
@ -48,9 +49,10 @@ const config = {
<style>
img.icon {
width: 10rem;
height: 10rem;
margin: 0 auto;
object-fit: cover;
object-position: center;
border-radius: 100%;
border-radius: 50%;
}
</style>

View file

@ -1,9 +1,10 @@
---
import { Boolify } from "../lib/boolify";
import c from "../lib/config";
const { href, text, icon } = Astro.props;
const useIcons = Boolify(import.meta.env.PUBLIC_USEICONS);
const useIcons = Boolify(c.USEICONS);
---
{

View file

@ -2,6 +2,7 @@
import Sidebar from "../components/Sidebar.astro";
import pb from "../lib/pb";
import c from "../lib/config";
const avatarRec = await pb
@ -20,8 +21,8 @@ const config = {
icon,
socials,
background,
title: import.meta.env.PUBLIC_TITLE,
description: import.meta.env.PUBLIC_DESCRIPTION,
title: c.TITLE,
description: c.DESCRIPTION,
};
export const prerender = false;

View file

@ -2,6 +2,7 @@
import Lightbox from "../components/Lightbox.astro";
import Sidebar from "../components/Sidebar.astro";
import pb from "../lib/pb";
import c from "../lib/config";
export const prerender = false;
@ -21,8 +22,8 @@ const config = {
icon,
socials,
background,
title: import.meta.env.PUBLIC_TITLE,
description: import.meta.env.PUBLIC_DESCRIPTION,
title: c.TITLE,
description: c.DESCRIPTION,
};
---

View file

@ -1,4 +1,5 @@
---
import config from "../lib/config";
import pb from "../lib/pb";
@ -17,7 +18,7 @@ const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgrou
<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">
<meta name="generator" content={Astro.generator} />
<title>{import.meta.env.PUBLIC_TITLE}</title>
<title>{config.TITLE}</title>
</head>
<body>
<slot />

View file

@ -1,7 +1,6 @@
import PB from "pocketbase";
const pb = new PB(import.meta.env.POCKETBASE_URL)
import config from "./config";
const pb = new PB(config.POCKETBASE)
// pb.admins.authWithPassword(import.meta.env.POCKETBASE_USERNAME, import.meta.env.POCKETBASE_PASSWORD)
// pb.autoCancellation(false);
export default pb

View file

@ -2,7 +2,6 @@
import Sidebar from "../components/IndexSidebar.astro";
import IndexLayout from "../layouts/Index.astro";
console.log(import.meta);
---
<IndexLayout>