docker is now working using the worst workaround known to man.... i will fix this codebase one day probably
This commit is contained in:
@@ -3,7 +3,7 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm i
|
||||
COPY . .
|
||||
ENV PUBLIC_PB_URL=http://pb:8080
|
||||
ENV PUBLIC_PB_URL="http://pb:8090"
|
||||
ENV PUBLIC_URL=http://localhost:4321
|
||||
|
||||
RUN npm run build
|
||||
|
||||
@@ -11,7 +11,7 @@ const records = await pb.collection('recipes').getFullList()
|
||||
const recipes = records.map(r => new Recipe(r.cooklang))
|
||||
const ids = records.map(r => r.id)
|
||||
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
|
||||
)
|
||||
---
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ const re = await pb.collection('recipes').getOne(id as string)
|
||||
let recipeData = new Recipe(re.cooklang)
|
||||
|
||||
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])
|
||||
)
|
||||
---
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const records = await pb.collection('recipes').getFullList({
|
||||
const recipes = records.map(r => new Recipe(r.cooklang))
|
||||
const ids = records.map(r => r.id)
|
||||
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
|
||||
)
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user