diff --git a/Dockerfile b/Dockerfile index 29bebdb..34f5f6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,39 +1,23 @@ -FROM node:lts AS base -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -RUN corepack enable +FROM node:lts-slim as runtime WORKDIR /app -# By copying only the package.json and package-lock.json here, we ensure that the following `-deps` steps are independent of the source code. -# Therefore, the `-deps` steps will be skipped if only the source code changes. -COPY package.json pnpm-lock.yaml ./ +# Ensure that both node_modules and package-lock.json are removed. +COPY package.json . +RUN rm -rf node_modules package-lock.json +# Perform a fresh installation of npm dependencies. +RUN npm install -WORKDIR /app -COPY package.json pnpm-lock.yaml ./ -RUN pnpm install --frozen-lockfile - - - -FROM base AS prod-deps -RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --frozen-lockfile -RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile --prod - - - - -FROM base AS build-deps -RUN pnpm install - -FROM build-deps AS build +# Copy the rest of your application files. COPY . . -RUN pnpm run build -FROM base AS runtime -COPY --from=prod-deps /app/node_modules ./node_modules -COPY --from=build /app/dist ./dist +# Build your application. +RUN npm run build +# Set environment variables and expose the appropriate port. ENV HOST=0.0.0.0 ENV PORT=4321 EXPOSE 4321 + +# Define the command to run your application. CMD node ./dist/server/entry.mjs \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index 9057969..bf45864 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,7 +7,7 @@ import react from "@astrojs/react"; // https://astro.build/config export default defineConfig({ integrations: [tailwind(), react()], - output: "hybrid", + output: "server", adapter: node({ mode: "standalone", }), diff --git a/public/background.png b/public/background.png index b4fc64c..5f2baa8 100644 Binary files a/public/background.png and b/public/background.png differ diff --git a/src/components/Lightbox.astro b/src/components/Lightbox.astro index c4cecd4..cab6841 100644 --- a/src/components/Lightbox.astro +++ b/src/components/Lightbox.astro @@ -102,7 +102,7 @@ } .desc { - background-color: white; + background-color: darkgrey; max-width: 20%; margin: auto auto; padding: 1rem; diff --git a/src/layouts/CharacterList.astro b/src/layouts/CharacterList.astro index ecf52a5..0bc28c6 100644 --- a/src/layouts/CharacterList.astro +++ b/src/layouts/CharacterList.astro @@ -35,5 +35,6 @@ const { title, background } = config; background-repeat: no-repeat; background-position: center center; background-attachment: fixed; + color: whitesmoke; } diff --git a/src/layouts/Gallery.astro b/src/layouts/Gallery.astro index f740aaf..aa7c8d7 100644 --- a/src/layouts/Gallery.astro +++ b/src/layouts/Gallery.astro @@ -45,6 +45,7 @@ const { title, background } = config; background-repeat: no-repeat; background-position: center center; background-attachment: fixed; + color: whitesmoke; } /* :root { diff --git a/src/layouts/Index.astro b/src/layouts/Index.astro index 0ac8e03..e43fc7d 100644 --- a/src/layouts/Index.astro +++ b/src/layouts/Index.astro @@ -29,5 +29,11 @@ import config from "../../config.yaml"; background-repeat: no-repeat; background-position: center center; background-attachment: fixed; + color: whitesmoke; + /* backdrop-filter: brightness(0.5); */ + /* width: 100%; + height: 100%; + margin: 0; + padding: 0; */ } diff --git a/src/pages/characters/[slug].astro b/src/pages/characters/[slug].astro index 34c0ad0..791c774 100644 --- a/src/pages/characters/[slug].astro +++ b/src/pages/characters/[slug].astro @@ -38,6 +38,8 @@ const images = imageCollection.map((record) => { nsfw: record.nsfw, }; }); + +export const prerender = true --- diff --git a/src/pages/characters/index.astro b/src/pages/characters/index.astro index 93a4f82..b1da840 100644 --- a/src/pages/characters/index.astro +++ b/src/pages/characters/index.astro @@ -7,6 +7,8 @@ const characters = await pb .collection("characters") // @ts-ignore .getFullList({ expand: ["icon"] }); +export const prerender = true + ---