getting a little closer to making this work with docker

This commit is contained in:
June 2025-08-12 19:03:09 +12:00
parent 44f71b670e
commit b9b1111307
Signed by: breadone
GPG Key ID: FDC19FE143200483
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
PB_ADMIN_EMAIL=admin@example.com
PB_ADMIN_PASSWORD=secret-password
PUBLIC_PB_URL=http://pb:8080
PUBLIC_URL=http://your.domain.tld/
PB_DATA_DIR=/pb/pb_data

View File

@ -5,6 +5,10 @@ import node from '@astrojs/node';
import tailwindcss from '@tailwindcss/vite';
import { loadEnv } from "vite";
const { PUBLIC_PB_URL } = loadEnv(process.env.NODE_ENV, process.cwd(), "");
// https://astro.build/config
export default defineConfig({
output: 'server',
@ -18,7 +22,7 @@ export default defineConfig({
server: {
proxy: {
'/api': {
target: 'http://localhost:8080',
target: PUBLIC_PB_URL,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api'),
},