fix: payload building issues

This commit is contained in:
2026-06-17 23:58:51 +05:30
parent d3ab5028af
commit e974313f6d
15 changed files with 264 additions and 271 deletions
+8
View File
@@ -0,0 +1,8 @@
node_modules
dist
.astro
.cache
.env
.env.*
!.env.example
*.log
+1 -4
View File
@@ -5,7 +5,4 @@ PUBLIC_SITE_URL=https://softvowels.example
PUBLIC_PAYLOAD_API=https://cms.softvowels.example
# Internal Payload base URL used at build time (container-to-container)
PAYLOAD_API_INTERNAL=http://cms:3000
# Token required to call the /__revalidate webhook
REVALIDATE_TOKEN=change-me
PAYLOAD_API_INTERNAL=http://softvowels-cms:3000
+11 -9
View File
@@ -1,15 +1,17 @@
# syntax=docker/dockerfile:1.7
#
# Single-shot build image for the Astro site. The production deployment uses
# nginx:1.27-alpine with a bind mount to apps/web/dist (see docker-compose.yml),
# so the webhook can rewrite the site without rebuilding any image.
# Astro static site production image. Built and run by docker-compose.
#
# You only need this Dockerfile if you want a self-contained static site
# image (e.g. for a registry). For the normal homeserver flow, this image
# is never built.
# Multi-stage:
# deps - installs the workspace (only apps/web and apps/cms are
# needed for the web build, but we keep apps/cms/package.json
# so the workspace resolves cleanly).
# build - runs `astro build` to produce apps/web/dist.
# runtime - small nginx:1.27-alpine serving the baked-in dist/ and
# the custom nginx-default.conf.
#
# We install pnpm globally via npm to avoid corepack's strict version
# negotiation across Node 20 minor versions.
# We install pnpm via `npm install -g pnpm@9` instead of corepack so
# the version negotiation is unambiguous across Node 20 minor releases.
FROM node:20-alpine AS base
RUN npm install -g pnpm@9
@@ -30,7 +32,7 @@ RUN if [ -f pnpm-lock.yaml ]; then \
FROM deps AS build
ENV PUBLIC_PAYLOAD_API=https://cms.softvowels.example
ENV PUBLIC_SITE_URL=https://softvowels.example
ENV PAYLOAD_API_INTERNAL=http://cms:3000
ENV PAYLOAD_API_INTERNAL=http://softvowels-cms:3000
COPY apps/web ./apps/web
WORKDIR /repo/apps/web
RUN pnpm run build
+2 -2
View File
@@ -27,13 +27,13 @@ const {
const base =
'inline-flex items-center justify-center gap-2 font-label-md rounded-md transition-all duration-200 select-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98]';
const sizes: Record = {
const sizes: Record<Size, string> = {
sm: 'h-9 px-4 text-[13px]',
md: 'h-10 px-5 text-sm',
lg: 'h-12 px-7 text-label-md',
};
const variants: Record = {
const variants: Record<Variant, string> = {
primary: 'bg-primary text-white hover:brightness-110',
secondary: 'bg-white text-on-surface border border-border-subtle hover:border-primary',
ghost: 'text-primary hover:bg-primary/5',
+2 -2
View File
@@ -17,11 +17,11 @@ const {
ariaLabel,
} = Astro.props;
const surfaces: Record = {
const surfaces: Record<NonNullable<Props['variant']>, string> = {
raised: 'bg-surface-raised',
flat: 'bg-surface-container',
};
const pads: Record = {
const pads: Record<NonNullable<Props['padding']>, string> = {
none: '',
sm: 'p-4',
md: 'p-6',
+1 -1
View File
@@ -11,7 +11,7 @@ interface Props {
const { variant = 'solid', href, class: className = '', ariaLabel } = Astro.props;
const base =
'inline-flex items-center gap-1.5 rounded-full font-label-md tracking-wider uppercase text-[11px] px-2.5 py-1 transition-colors duration-200';
const variants: Record = {
const variants: Record<Variant, string> = {
solid: 'bg-primary text-white',
outline: 'border border-primary/40 text-primary',
soft: 'bg-primary/10 text-primary',
+1 -1
View File
@@ -10,7 +10,7 @@ interface Props {
}
const { name, size = 'md', class: className = '', filled = false, ariaLabel } = Astro.props;
const sizes: Record = {
const sizes: Record<NonNullable<Props['size']>, string> = {
sm: 'text-[18px]',
md: 'text-[20px]',
lg: 'text-[24px]',