return back to npm
This commit is contained in:
parent
a86fbff587
commit
fbbc2129f7
9 changed files with 26 additions and 30 deletions
40
Dockerfile
40
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
|
|
@ -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",
|
||||
}),
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 16 MiB After Width: | Height: | Size: 12 MiB |
|
@ -102,7 +102,7 @@
|
|||
}
|
||||
|
||||
.desc {
|
||||
background-color: white;
|
||||
background-color: darkgrey;
|
||||
max-width: 20%;
|
||||
margin: auto auto;
|
||||
padding: 1rem;
|
||||
|
|
|
@ -35,5 +35,6 @@ const { title, background } = config;
|
|||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-attachment: fixed;
|
||||
color: whitesmoke;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -45,6 +45,7 @@ const { title, background } = config;
|
|||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-attachment: fixed;
|
||||
color: whitesmoke;
|
||||
}
|
||||
/*
|
||||
:root {
|
||||
|
|
|
@ -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; */
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -38,6 +38,8 @@ const images = imageCollection.map((record) => {
|
|||
nsfw: record.nsfw,
|
||||
};
|
||||
});
|
||||
|
||||
export const prerender = true
|
||||
---
|
||||
|
||||
<Gallery>
|
||||
|
|
|
@ -7,6 +7,8 @@ const characters = await pb
|
|||
.collection("characters")
|
||||
// @ts-ignore
|
||||
.getFullList({ expand: ["icon"] });
|
||||
export const prerender = true
|
||||
|
||||
---
|
||||
|
||||
<CharacterList>
|
||||
|
|
Loading…
Add table
Reference in a new issue