Refactor content structure and add basic authentication utilities
- Moved event and gallery data to JSON files for cleaner content management. - Added session management utilities with CSRF protection. - Integrated OAuth-based login and logout APIs. - Updated dependencies, including Astro and introduced dotenv-cli. - Enhanced package.json with local environment support.
This commit is contained in:
10
Dockerfile
10
Dockerfile
@ -4,19 +4,17 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
# Ensure CSS variables are present
|
||||
RUN mkdir -p public/styles
|
||||
RUN cp -r styles/* public/styles/ || true
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine AS production
|
||||
|
||||
WORKDIR /app
|
||||
RUN npm install -g serve
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=build /app/dist ./dist
|
||||
|
||||
# install minimal deps to run node if needed (alpine already has node)
|
||||
EXPOSE 3000
|
||||
CMD ["serve", "-s", "dist", "-l", "3000"]
|
||||
CMD ["node", "./dist/server/entry.mjs"]
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD wget -qO- http://localhost:3000/ || exit 1
|
||||
Reference in New Issue
Block a user