wip
This commit is contained in:
parent
40017dd29d
commit
0bd0cc9fc9
|
|
@ -217,7 +217,9 @@ export type FulltextSearchProvider = 'sqlLike' | 'sqlPgroonga' | 'meilisearch';
|
|||
const _filename = fileURLToPath(import.meta.url);
|
||||
const _dirname = dirname(_filename);
|
||||
|
||||
export const compiledConfigFilePath = resolve(_dirname, '../../../built/.config.json');
|
||||
const compiledConfigFilePathForTest = resolve(_dirname, '../../../built/._config_.json');
|
||||
|
||||
export const compiledConfigFilePath = fs.existsSync(compiledConfigFilePathForTest) ? compiledConfigFilePathForTest : resolve(_dirname, '../../../built/.config.json');
|
||||
|
||||
export function loadConfig(): Config {
|
||||
if (!fs.existsSync(compiledConfigFilePath)) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"url": "https://${HOST}/",
|
||||
"port": 3000,
|
||||
"db": {
|
||||
"host": "db.${HOST}",
|
||||
"port": 5432,
|
||||
"db": "misskey",
|
||||
"user": "postgres",
|
||||
"pass": "postgres"
|
||||
},
|
||||
"dbReplications": false,
|
||||
"trustProxy": true,
|
||||
"redis": {
|
||||
"host": "redis.test",
|
||||
"port": 6379
|
||||
},
|
||||
"id": "aidx",
|
||||
"proxyBypassHosts": [
|
||||
"api.deepl.com",
|
||||
"api-free.deepl.com",
|
||||
"www.recaptcha.net",
|
||||
"hcaptcha.com",
|
||||
"challenges.cloudflare.com"
|
||||
],
|
||||
"allowedPrivateNetworks": [
|
||||
"127.0.0.1/32",
|
||||
"172.20.0.0/16"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
url: https://${HOST}/
|
||||
port: 3000
|
||||
db:
|
||||
host: db.${HOST}
|
||||
port: 5432
|
||||
db: misskey
|
||||
user: postgres
|
||||
pass: postgres
|
||||
dbReplications: false
|
||||
trustProxy: true
|
||||
redis:
|
||||
host: redis.test
|
||||
port: 6379
|
||||
id: 'aidx'
|
||||
proxyBypassHosts:
|
||||
- api.deepl.com
|
||||
- api-free.deepl.com
|
||||
- www.recaptcha.net
|
||||
- hcaptcha.com
|
||||
- challenges.cloudflare.com
|
||||
allowedPrivateNetworks:
|
||||
- 127.0.0.1/32
|
||||
- 172.20.0.0/16
|
||||
|
|
@ -37,8 +37,8 @@ services:
|
|||
- internal_network_a
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./.config/a.test.default.yml
|
||||
target: /misskey/.config/default.yml
|
||||
source: ./.config/a.config.json
|
||||
target: /misskey/built/._config_.json
|
||||
read_only: true
|
||||
|
||||
db.a.test:
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ services:
|
|||
- internal_network_b
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./.config/b.test.default.yml
|
||||
target: /misskey/.config/default.yml
|
||||
source: ./.config/b.config.json
|
||||
target: /misskey/built/._config_.json
|
||||
read_only: true
|
||||
|
||||
db.b.test:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function generate {
|
|||
-days 500
|
||||
if [ ! -f .config/docker.env ]; then cp .config/example.docker.env .config/docker.env; fi
|
||||
if [ ! -f .config/$1.conf ]; then sed "s/\${HOST}/$1/g" .config/example.conf > .config/$1.conf; fi
|
||||
if [ ! -f .config/$1.default.yml ]; then sed "s/\${HOST}/$1/g" .config/example.default.yml > .config/$1.default.yml; fi
|
||||
if [ ! -f .config/$1.default.yml ]; then sed "s/\${HOST}/$1/g" .config/example.config.json > .config/$1.config.json; fi
|
||||
}
|
||||
|
||||
generate a.test
|
||||
|
|
|
|||
Loading…
Reference in New Issue