feat: add Docker support and enhance environment configuration

- Introduce .dockerignore for Docker build optimization
- Add Dockerfile for containerization setup
- Update .env.example to clear Sentry variables and rename HOST to TELEGRAM_HOST
- Modify astro.config.mjs to conditionally exclude SSR dependencies in Docker builds
- Adjust postinstall script to safely handle missing .git directory
- Refactor telegram host retrieval for clarity and consistency
This commit is contained in:
ccbikai
2024-08-31 13:41:16 +08:00
parent a7dd0cd486
commit 2b9807bd89
7 changed files with 49 additions and 15 deletions

View File

@@ -183,7 +183,7 @@ export async function getChannelInfo(Astro, { before = '', after = '', q = '', t
}
// Where t.me can also be telegram.me, telegram.dog
const host = getEnv(import.meta.env, Astro, 'HOST') ?? 't.me'
const host = getEnv(import.meta.env, Astro, 'TELEGRAM_HOST') ?? 't.me'
const channel = getEnv(import.meta.env, Astro, 'CHANNEL')
const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'