feat: support self-host docker build (#5506)

Test command: `docker compose -f ./.github/deployment/self-host/compose.yaml up`
This commit is contained in:
LongYinan
2024-01-10 08:35:21 +00:00
parent 0d7ffb0511
commit 237722f7f9
20 changed files with 241 additions and 37 deletions
+13 -1
View File
@@ -1,5 +1,17 @@
import { homedir } from 'node:os';
import { join } from 'node:path';
import { config } from 'dotenv';
import { SERVER_FLAVOR } from './config/default';
if (SERVER_FLAVOR === 'selfhosted') {
config({ path: join(homedir(), '.affine', '.env') });
} else {
config();
}
import 'reflect-metadata';
import 'dotenv/config';
import './affine';
import './affine.config';