i hate docker so much
This commit is contained in:
parent
71d3afb1d3
commit
c7919d0d22
14 changed files with 815 additions and 47 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -22,5 +22,3 @@ pnpm-debug.log*
|
|||
|
||||
# jetbrains setting folder
|
||||
.idea/
|
||||
|
||||
config*
|
|
@ -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}
|
||||
|
|
|
@ -12,6 +12,6 @@ export default defineConfig({
|
|||
mode: "standalone",
|
||||
}),
|
||||
vite: {
|
||||
plugins: [yaml()],
|
||||
plugins: [yaml()]
|
||||
},
|
||||
});
|
||||
|
|
23
compose.yml
23
compose.yml
|
@ -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
779
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
---
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
---
|
||||
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
---
|
||||
|
||||
|
|
|
@ -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 />
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import Sidebar from "../components/IndexSidebar.astro";
|
||||
import IndexLayout from "../layouts/Index.astro";
|
||||
|
||||
console.log(import.meta);
|
||||
---
|
||||
|
||||
<IndexLayout>
|
||||
|
|
Loading…
Add table
Reference in a new issue