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
|
# jetbrains setting folder
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
config*
|
|
|
@ -3,12 +3,6 @@ WORKDIR /app
|
||||||
|
|
||||||
COPY package.json package-lock.json ./
|
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 POCKETBASE_URL=${POCKETBASE_URL}
|
||||||
ENV PUBLIC_DESCRIPTION=${PUBLIC_DESCRIPTION}
|
ENV PUBLIC_DESCRIPTION=${PUBLIC_DESCRIPTION}
|
||||||
ENV PUBLIC_TITLE=${PUBLIC_TITLE}
|
ENV PUBLIC_TITLE=${PUBLIC_TITLE}
|
||||||
|
|
|
@ -12,6 +12,6 @@ export default defineConfig({
|
||||||
mode: "standalone",
|
mode: "standalone",
|
||||||
}),
|
}),
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [yaml()],
|
plugins: [yaml()]
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
23
compose.yml
23
compose.yml
|
@ -1,16 +1,15 @@
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
image: phobos
|
||||||
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
|
|
||||||
ports:
|
ports:
|
||||||
- 4321:4321
|
- 4321:4321
|
||||||
# environment:
|
environment:
|
||||||
# - PUBLIC_TITLE=Astro Gallery
|
- PUBLIC_POCKETBASE=https://pb.data.lio.systems
|
||||||
# - PUBLIC_DESCRIPTION=This is my Gallery Site
|
- PUBLIC_TITLE=Astro Gallery
|
||||||
# - PUBLIC_USEICONS=true
|
- 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",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "dotenvx run -- astro dev",
|
||||||
"start": "astro dev",
|
"start": "dotenvx run -- astro dev",
|
||||||
"build": "rimraf dist && astro check && astro build",
|
"build": "astro check && dotenvx run -- astro build",
|
||||||
"preview": "astro preview",
|
"preview": "dotenvx run -- astro preview",
|
||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
"@astrojs/node": "^8.3.2",
|
"@astrojs/node": "^8.3.2",
|
||||||
"@astrojs/react": "^3.6.0",
|
"@astrojs/react": "^3.6.0",
|
||||||
"@astrojs/tailwind": "^5.1.0",
|
"@astrojs/tailwind": "^5.1.0",
|
||||||
|
"@dotenvx/dotenvx": "^1.6.4",
|
||||||
"@types/react": "^18.3.2",
|
"@types/react": "^18.3.2",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"astro": "^4.12.2",
|
"astro": "^4.12.2",
|
||||||
|
|
|
@ -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 "../lib/config";
|
||||||
|
|
||||||
|
|
||||||
const avatarRec = await pb
|
const avatarRec = await pb
|
||||||
|
@ -14,8 +15,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,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 "../lib/config";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,8 +15,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,
|
||||||
};
|
};
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -48,9 +49,10 @@ const config = {
|
||||||
<style>
|
<style>
|
||||||
img.icon {
|
img.icon {
|
||||||
width: 10rem;
|
width: 10rem;
|
||||||
|
height: 10rem;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
border-radius: 100%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
---
|
---
|
||||||
import { Boolify } from "../lib/boolify";
|
import { Boolify } from "../lib/boolify";
|
||||||
|
import c from "../lib/config";
|
||||||
|
|
||||||
|
|
||||||
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 "../lib/config";
|
||||||
|
|
||||||
|
|
||||||
const avatarRec = await pb
|
const avatarRec = await pb
|
||||||
|
@ -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 "../lib/config";
|
||||||
|
|
||||||
|
|
||||||
export const prerender = false;
|
export const prerender = false;
|
||||||
|
@ -21,8 +22,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,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
import config from "../lib/config";
|
||||||
import pb from "../lib/pb";
|
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="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>{config.TITLE}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import PB from "pocketbase";
|
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
|
export default pb
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import Sidebar from "../components/IndexSidebar.astro";
|
import Sidebar from "../components/IndexSidebar.astro";
|
||||||
import IndexLayout from "../layouts/Index.astro";
|
import IndexLayout from "../layouts/Index.astro";
|
||||||
|
|
||||||
console.log(import.meta);
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<IndexLayout>
|
<IndexLayout>
|
||||||
|
|
Loading…
Add table
Reference in a new issue