mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
|
|
@ -1,61 +1,18 @@
|
|||
# Multi-stage Dockerfile for Astro landing pages
|
||||
# This is a template - copy and customize for each landing page
|
||||
|
||||
# ============================================
|
||||
# Build Stage
|
||||
# ============================================
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
# Install pnpm
|
||||
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy workspace files
|
||||
COPY pnpm-workspace.yaml ./
|
||||
COPY package.json ./
|
||||
COPY pnpm-lock.yaml ./
|
||||
|
||||
# Copy all shared packages
|
||||
COPY packages/ ./packages/
|
||||
|
||||
# Copy the specific landing page
|
||||
ARG SERVICE_PATH
|
||||
COPY ${SERVICE_PATH} ./${SERVICE_PATH}
|
||||
|
||||
# Install all dependencies
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Build shared packages first
|
||||
RUN pnpm run build:packages
|
||||
|
||||
# Build the landing page
|
||||
WORKDIR /app/${SERVICE_PATH}
|
||||
RUN pnpm build
|
||||
|
||||
# ============================================
|
||||
# Production Stage - Nginx
|
||||
# ============================================
|
||||
FROM nginx:alpine AS production
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY docker/nginx/astro.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy built static files
|
||||
ARG SERVICE_PATH
|
||||
COPY --from=builder /app/${SERVICE_PATH}/dist /usr/share/nginx/html
|
||||
|
||||
# Add healthcheck script
|
||||
RUN echo '#!/bin/sh' > /usr/local/bin/healthcheck.sh && \
|
||||
echo 'curl -f http://localhost/ || exit 1' >> /usr/local/bin/healthcheck.sh && \
|
||||
chmod +x /usr/local/bin/healthcheck.sh
|
||||
|
||||
# Expose port
|
||||
EXPOSE 80
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
||||
CMD /usr/local/bin/healthcheck.sh
|
||||
|
||||
# Start nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
# Multi-stage Dockerfile for Astro landing pages # This is a template - copy and customize for each
|
||||
landing page # ============================================ # Build Stage #
|
||||
============================================ FROM node:20-alpine AS builder # Install pnpm RUN
|
||||
corepack enable && corepack prepare pnpm@9.15.0 --activate WORKDIR /app # Copy workspace files COPY
|
||||
pnpm-workspace.yaml ./ COPY package.json ./ COPY pnpm-lock.yaml ./ # Copy all shared packages COPY
|
||||
packages/ ./packages/ # Copy the specific landing page ARG SERVICE_PATH COPY ${SERVICE_PATH} ./${
|
||||
SERVICE_PATH
|
||||
}
|
||||
# Install all dependencies RUN pnpm install --frozen-lockfile # Build shared packages first RUN pnpm
|
||||
run build:packages # Build the landing page WORKDIR /app/${SERVICE_PATH}
|
||||
RUN pnpm build # ============================================ # Production Stage - Nginx # ============================================
|
||||
FROM nginx:alpine AS production # Copy nginx configuration COPY docker/nginx/astro.conf /etc/nginx/conf.d/default.conf
|
||||
# Copy built static files ARG SERVICE_PATH COPY --from=builder /app/${SERVICE_PATH}/dist
|
||||
/usr/share/nginx/html # Add healthcheck script RUN echo '#!/bin/sh' > /usr/local/bin/healthcheck.sh
|
||||
&& \ echo 'curl -f http://localhost/ || exit 1' >> /usr/local/bin/healthcheck.sh && \ chmod +x
|
||||
/usr/local/bin/healthcheck.sh # Expose port EXPOSE 80 # Health check HEALTHCHECK --interval=30s
|
||||
--timeout=10s --start-period=10s --retries=3 \ CMD /usr/local/bin/healthcheck.sh # Start nginx CMD
|
||||
["nginx", "-g", "daemon off;"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue