[FA-misc] Astro migration works, probably want to touchup the frontend but that can be in Phase 4
This commit is contained in:
45
fictionarchive-web-astro/Dockerfile
Normal file
45
fictionarchive-web-astro/Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
FROM node:20-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Build arguments for environment variables
|
||||
ARG PUBLIC_GRAPHQL_URI
|
||||
ARG PUBLIC_OIDC_AUTHORITY
|
||||
ARG PUBLIC_OIDC_CLIENT_ID
|
||||
ARG PUBLIC_OIDC_REDIRECT_URI
|
||||
ARG PUBLIC_OIDC_POST_LOGOUT_REDIRECT_URI
|
||||
ARG PUBLIC_OIDC_SCOPE
|
||||
|
||||
# Set environment variables for build
|
||||
ENV PUBLIC_GRAPHQL_URI=$PUBLIC_GRAPHQL_URI
|
||||
ENV PUBLIC_OIDC_AUTHORITY=$PUBLIC_OIDC_AUTHORITY
|
||||
ENV PUBLIC_OIDC_CLIENT_ID=$PUBLIC_OIDC_CLIENT_ID
|
||||
ENV PUBLIC_OIDC_REDIRECT_URI=$PUBLIC_OIDC_REDIRECT_URI
|
||||
ENV PUBLIC_OIDC_POST_LOGOUT_REDIRECT_URI=$PUBLIC_OIDC_POST_LOGOUT_REDIRECT_URI
|
||||
ENV PUBLIC_OIDC_SCOPE=$PUBLIC_OIDC_SCOPE
|
||||
|
||||
# Install dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
# Copy source and build
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Production runtime
|
||||
FROM node:20-alpine AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy built output and production dependencies
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/package.json ./
|
||||
|
||||
# Runtime configuration
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=80
|
||||
EXPOSE 80
|
||||
|
||||
# Start the Node.js server
|
||||
CMD ["node", "./dist/server/entry.mjs"]
|
||||
Reference in New Issue
Block a user