Working Docker build 🎉
This commit is contained in:
@ -9,7 +9,7 @@ app.get("/", (_, res) => {
|
||||
});
|
||||
|
||||
const PORT = Number(process.env.PAYLOAD_PORT) ?? 3000;
|
||||
const HOST = process.env.PAYLOAD_ADDRESS ?? 'localhost';
|
||||
const HOST = process.env.PAYLOAD_HOST ?? 'localhost';
|
||||
|
||||
const start = async () => {
|
||||
// Initialize Payload
|
||||
|
||||
@ -9,16 +9,19 @@ export default defineConfig({
|
||||
integrations: [mdx(), tailwind(), svelte()],
|
||||
server: {
|
||||
port: parseInt(process.env.ASTRO_PORT ?? "3000"),
|
||||
// FIXME 3wc: seems to be ignored?
|
||||
hostname: process.env.ASTRO_HOST ?? "0.0.0.0",
|
||||
},
|
||||
output: "server",
|
||||
adapter: node({
|
||||
mode: "standalone",
|
||||
}),
|
||||
vite: {
|
||||
// FIXME 3wc: shouldn't need to hardcode this
|
||||
define: {
|
||||
"import.meta.env.PAYLOAD_PUBLIC_SERVER_URL": JSON.stringify(
|
||||
process.env.PAYLOAD_PUBLIC_SERVER_URL,
|
||||
),
|
||||
"http://api:3001"
|
||||
)
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -2,7 +2,9 @@ import type { Page } from "@turbopress/api/types";
|
||||
import { getPayloadCollection } from "./api.service";
|
||||
|
||||
export async function getPageCollection(query: any = null) {
|
||||
const url = `${import.meta.env.PAYLOAD_PUBLIC_SERVER_URL}/api/pages`;
|
||||
// FIXME 3wc: shouldn't need to hardcode this?!
|
||||
//const url = `${import.meta.env.PAYLOAD_PUBLIC_SERVER_URL}/api/pages`;
|
||||
const url = `http://api:3001/api/pages`;
|
||||
return getPayloadCollection<Page>(url, query);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user