72 lines
2.7 KiB
JavaScript
72 lines
2.7 KiB
JavaScript
// @ts-check
|
|
import { defineConfig, envField } from 'astro/config';
|
|
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
import svelte, { vitePreprocess } from '@astrojs/svelte';
|
|
|
|
import node from '@astrojs/node';
|
|
|
|
import { tmpdir } from 'node:os';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
output: 'server',
|
|
prefetch: true,
|
|
base: process.env.ROOT_URL ? new URL(process.env.ROOT_URL).pathname.replace(/^\/+/, '') : undefined,
|
|
|
|
security: {
|
|
checkOrigin: false
|
|
},
|
|
|
|
devToolbar: {
|
|
enabled: false
|
|
},
|
|
|
|
vite: {
|
|
plugins: [tailwindcss()]
|
|
},
|
|
|
|
integrations: [svelte({ preprocess: vitePreprocess() })],
|
|
|
|
env: {
|
|
schema: {
|
|
API_SECRET: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
|
|
ADMIN_USER: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
ADMIN_PASSWORD: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
ADMIN_COOKIE: envField.string({ context: 'server', access: 'secret', default: 'muelleel' }),
|
|
|
|
CACHE_PATH: envField.string({ context: 'server', access: 'secret', default: tmpdir() }),
|
|
UPLOAD_PATH: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
VIDEO_PATH: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
|
|
MAX_UPLOAD_BYTES: envField.number({ context: 'server', access: 'secret', default: 20 * 1024 * 1024 }),
|
|
|
|
START_DATE: envField.string({ context: 'server', access: 'secret', default: '1970-01-01' }),
|
|
|
|
WEBHOOK_ENDPOINT: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
|
|
STATISTICS_ENDPOINT: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
STATISTICS_INTERVAL: envField.number({ context: 'server', access: 'secret', default: 60 * 30 }),
|
|
|
|
TEAMSPEAK_LINK: envField.string({ context: 'server', access: 'secret', default: 'http://example.com' }),
|
|
DISCORD_LINK: envField.string({ context: 'server', access: 'secret', default: 'http://example.com' }),
|
|
PAYPAL_LINK: envField.string({ context: 'server', access: 'secret', default: 'http://example.com' }),
|
|
SERVER_IP: envField.string({ context: 'server', access: 'secret', default: 'http://example.com' }),
|
|
|
|
HOMEPAGE_TRAILER_URL: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
|
|
DATABASE_URI: envField.string({ context: 'server', access: 'secret' }),
|
|
|
|
ROOT_URL: envField.string({ context: 'server', access: 'secret', default: 'http://localhost:4321' }),
|
|
|
|
OPENXBL_API_KEY: envField.string({ context: 'server', access: 'secret', optional: true })
|
|
}
|
|
},
|
|
|
|
adapter: node({
|
|
mode: 'standalone'
|
|
})
|
|
});
|