docker is now working using the worst workaround known to man.... i will fix this codebase one day probably

This commit is contained in:
2025-11-17 18:57:42 +13:00
parent b85446865e
commit 427129de19
4 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm i RUN npm i
COPY . . COPY . .
ENV PUBLIC_PB_URL=http://pb:8080 ENV PUBLIC_PB_URL="http://pb:8090"
ENV PUBLIC_URL=http://localhost:4321 ENV PUBLIC_URL=http://localhost:4321
RUN npm run build RUN npm run build

View File

@@ -11,7 +11,7 @@ const records = await pb.collection('recipes').getFullList()
const recipes = records.map(r => new Recipe(r.cooklang)) const recipes = records.map(r => new Recipe(r.cooklang))
const ids = records.map(r => r.id) const ids = records.map(r => r.id)
const images = await Promise.all( const images = await Promise.all(
records.map(r => pb.files.getURL(r, r.images[0]).substring(21)) // get first image from each recipe as a cover image records.map(r => '/api' + pb.files.getURL(r, r.images[0]).split('api')[1] ) // get first image from each recipe as a cover image
) )
--- ---

View File

@@ -16,7 +16,7 @@ const re = await pb.collection('recipes').getOne(id as string)
let recipeData = new Recipe(re.cooklang) let recipeData = new Recipe(re.cooklang)
const images = await Promise.all( const images = await Promise.all(
re.images.map(r => pb.files.getURL(re, r).substring(21)) re.images.map(r => '/api' + pb.files.getURL(re, r).split('api')[1])
) )
--- ---

View File

@@ -14,7 +14,7 @@ const records = await pb.collection('recipes').getFullList({
const recipes = records.map(r => new Recipe(r.cooklang)) const recipes = records.map(r => new Recipe(r.cooklang))
const ids = records.map(r => r.id) const ids = records.map(r => r.id)
const images = await Promise.all( const images = await Promise.all(
records.map(r => pb.files.getURL(r, r.images[0]).substring(21)) // get first image from each recipe as a cover image records.map(r => '/api' + pb.files.getURL(r, r.images[0]).split('api')[1]) // get first image from each recipe as a cover image
) )
--- ---