forked from mirrors/misskey
refactor(backend): 変換後.config.jsonに統一するように+修正など (#16929)
* wip * Update config.ts * wip * convertは元ファイルを変更するようなニュアンスを若干感じるのでcompileに改名 * wip * Update package.json * Revert "Update package.json" This reverts commit e5c28023168f4631dc6b36a14b35cfddbad1fac0. * wip * wip * 謎 * clean up * wip * wip * Revert "wip" This reverts commit 3aa25ac7cf337d57412308e63d8f54e2536b0f7f. * wip * wip * Update dummy.yml * wip * Update compile_config.js * Update compile_config.js * wip * Revert "wip" This reverts commit fd78e097c65f747962e7a411938a0e67538ed347. * Update dummy.yml * Update compile_config.js
This commit is contained in:
2
packages/backend/test-federation/.config/dummy.yml
Normal file
2
packages/backend/test-federation/.config/dummy.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
url: https://example.com/
|
||||
port: 3000
|
||||
29
packages/backend/test-federation/.config/example.config.json
Normal file
29
packages/backend/test-federation/.config/example.config.json
Normal file
@@ -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,12 +37,8 @@ services:
|
||||
- internal_network_a
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./.config/a.test.default.yml
|
||||
target: /misskey/.config/default.yml
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ../scripts/convert_config.js
|
||||
target: /misskey/packages/backend/scripts/convert_config.js
|
||||
source: ./.config/a.test.config.json
|
||||
target: /misskey/built/._config_.json
|
||||
read_only: true
|
||||
|
||||
db.a.test:
|
||||
|
||||
@@ -37,12 +37,8 @@ services:
|
||||
- internal_network_b
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./.config/b.test.default.yml
|
||||
target: /misskey/.config/default.yml
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ../scripts/convert_config.js
|
||||
target: /misskey/packages/backend/scripts/convert_config.js
|
||||
source: ./.config/b.test.config.json
|
||||
target: /misskey/built/._config_.json
|
||||
read_only: true
|
||||
|
||||
db.b.test:
|
||||
|
||||
@@ -21,6 +21,10 @@ services:
|
||||
- type: bind
|
||||
source: ../../../built
|
||||
target: /misskey/built
|
||||
read_only: false
|
||||
- type: bind
|
||||
source: ./.config/dummy.yml
|
||||
target: /misskey/.config/default.yml
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ../assets
|
||||
@@ -43,8 +47,8 @@ services:
|
||||
target: /misskey/packages/backend/package.json
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ../scripts/convert_config.js
|
||||
target: /misskey/packages/backend/scripts/convert_config.js
|
||||
source: ../scripts/compile_config.js
|
||||
target: /misskey/packages/backend/scripts/compile_config.js
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ../../misskey-js/built
|
||||
|
||||
@@ -55,8 +55,8 @@ services:
|
||||
target: /misskey/packages/backend/jest.js
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ../scripts/convert_config.js
|
||||
target: /misskey/packages/backend/scripts/convert_config.js
|
||||
source: ../scripts/compile_config.js
|
||||
target: /misskey/packages/backend/scripts/compile_config.js
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ../../misskey-js/built
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user