feat(play-standalone): Add PEER_URL env variable (#302)

## Description

Adds PEER_URL env variable for setting peer URL (query param still takes
priority if set).

- Useful for self-hosters
- Was a pain to figure out



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- New Features
- Support configuring the peer server URL via an environment variable,
with automatic fallback to the URL parameter or a default.
- Server-provided configuration is securely passed to the client to
simplify deployment setup.

- Chores
- Excluded common build artifacts and IDE directories from container
contexts to reduce image size and speed up builds.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
This commit is contained in:
Kristian Ollikainen
2025-09-24 20:08:20 +03:00
committed by GitHub
parent 590fe5e196
commit 5705029972
3 changed files with 33 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
// @ts-check
import { defineConfig } from "astro/config";
import { defineConfig, envField } from "astro/config";
import node from "@astrojs/node";
// https://astro.build/config
@@ -12,4 +12,9 @@ export default defineConfig({
"host": "0.0.0.0",
"port": 3000,
},
env: {
schema: {
PEER_URL: envField.string({ context: "server", access: "secret", optional: true }),
}
}
});