Compare commits

..

4 Commits

Author SHA1 Message Date
925765233e fix: retrieve drafts on staging
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 2m44s
Build & Deploy / 🏗️ Build (push) Successful in 3m56s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 34m12s
Build & Deploy / ⚡ Performance & Accessibility (push) Successful in 5m55s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-02-26 03:13:33 +01:00
0487bd8ebe feat: show draft posts and products on testing and staging
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m44s
Build & Deploy / 🏗️ Build (push) Successful in 3m55s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 33m41s
Build & Deploy / ⚡ Performance & Accessibility (push) Successful in 8m15s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-02-26 02:59:30 +01:00
87b2624ab3 fix(docker): remove outdated 120in password fallback causing prod auth issues
Some checks failed
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / ⚡ Performance & Accessibility (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🔍 Prepare (push) Has been cancelled
2026-02-26 02:57:43 +01:00
7cad437eb4 chore: optimize nextjs build memory and rename middleware
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 2m5s
Build & Deploy / 🏗️ Build (push) Successful in 4m3s
Build & Deploy / 🚀 Deploy (push) Successful in 20s
Build & Deploy / ⚡ Performance & Accessibility (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
2026-02-26 02:47:49 +01:00
9 changed files with 16 additions and 13 deletions

View File

@@ -41,8 +41,8 @@ CMD ["pnpm", "dev:local"]
# Build application
# Stage 3: Builder (Production)
FROM base AS builder
# Limit memory to 2GB to prevent ResourceExhausted on 4GB runner
ENV NODE_OPTIONS="--max-old-space-size=2048"
# Limit memory to 1GB to prevent ResourceExhausted in combination with worker limits
ENV NODE_OPTIONS="--max-old-space-size=1024"
RUN pnpm build
# Stage 3: Runner

View File

@@ -10,7 +10,7 @@ services:
env_file:
- ${ENV_FILE:-.env}
environment:
POSTGRES_URI: postgres://${PAYLOAD_DB_USER:-payload}:${PAYLOAD_DB_PASSWORD:-120in09oenaoinsd9iaidon}@klz-db:5432/${PAYLOAD_DB_NAME:-payload}
POSTGRES_URI: postgres://${PAYLOAD_DB_USER:-payload}:${PAYLOAD_DB_PASSWORD:-payload}@klz-db:5432/${PAYLOAD_DB_NAME:-payload}
PAYLOAD_SECRET: ${PAYLOAD_SECRET:-fallback-secret-for-production-needs-change}
volumes:
- klz_media_data:/app/public/media
@@ -82,7 +82,7 @@ services:
environment:
POSTGRES_DB: ${PAYLOAD_DB_NAME:-payload}
POSTGRES_USER: ${PAYLOAD_DB_USER:-payload}
POSTGRES_PASSWORD: ${PAYLOAD_DB_PASSWORD:-120in09oenaoinsd9iaidon}
POSTGRES_PASSWORD: ${PAYLOAD_DB_PASSWORD:-payload}
volumes:
- klz_db_data:/var/lib/postgresql/data
networks:

View File

@@ -59,7 +59,7 @@ export async function getPostBySlug(slug: string, locale: string): Promise<PostD
try {
const payload = await getPayload({ config: configPromise });
const isDev = process.env.NODE_ENV === 'development';
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
const { docs } = await payload.find({
collection: 'posts',
where: {
@@ -107,7 +107,7 @@ export async function getPostBySlug(slug: string, locale: string): Promise<PostD
export async function getAllPosts(locale: string): Promise<PostData[]> {
try {
const payload = await getPayload({ config: configPromise });
const isDev = process.env.NODE_ENV === 'development';
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
const { docs } = await payload.find({
collection: 'posts',
where: {

View File

@@ -26,7 +26,7 @@ export async function getProductMetadata(
const payload = await getPayload({ config: configPromise });
const fileSlug = await mapSlugToFileSlug(slug, locale);
const isDev = process.env.NODE_ENV === 'development';
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
const result = await payload.find({
collection: 'products',
where: {
@@ -70,7 +70,7 @@ export async function getProductBySlug(slug: string, locale: string): Promise<Pr
const payload = await getPayload({ config: configPromise });
const fileSlug = await mapSlugToFileSlug(slug, locale);
const isDev = process.env.NODE_ENV === 'development';
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
const result = await payload.find({
collection: 'products',
where: {
@@ -127,7 +127,7 @@ export async function getProductBySlug(slug: string, locale: string): Promise<Pr
export async function getAllProductSlugs(locale: string): Promise<string[]> {
try {
const payload = await getPayload({ config: configPromise });
const isDev = process.env.NODE_ENV === 'development';
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
const result = await payload.find({
collection: 'products',
where: {
@@ -157,7 +157,7 @@ export async function getAllProducts(locale: string): Promise<ProductData[]> {
images: true,
} as const;
const isDev = process.env.NODE_ENV === 'development';
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
const result = await payload.find({
collection: 'products',
where: {

View File

@@ -13,6 +13,9 @@ const nextConfig = {
},
experimental: {
optimizePackageImports: ['lucide-react', 'framer-motion', '@/components/ui'],
cpus: 1,
workerThreads: false,
memoryBasedWorkersCount: true,
},
reactStrictMode: false,
productionBrowserSourceMaps: false,

View File

@@ -13,7 +13,7 @@ export const Pages: CollectionConfig = {
},
access: {
read: ({ req: { user } }) => {
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging') {
return true;
}
if (user) {

View File

@@ -23,7 +23,7 @@ export const Posts: CollectionConfig = {
},
access: {
read: ({ req: { user } }) => {
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging') {
return true;
}
if (user) {

View File

@@ -24,7 +24,7 @@ export const Products: CollectionConfig = {
},
access: {
read: ({ req: { user } }) => {
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging') {
return true;
}
if (user) {