Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit f7896da

Browse files
committed
feat(config): use conf.d for unified config
1 parent bbc0d65 commit f7896da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+475
-605
lines changed

.dockerignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,25 @@ yarn-error.log*
66

77
/dist
88
/.env
9-
/.config.json
109
/data
10+
/conf.d/*
11+
!/conf.d/.keep
12+
13+
# Upload provider dir
14+
/uploads
1115

1216
.DS_Store
1317
Thumbs.db
1418
ehthumbs.db
1519
Desktop.ini
1620
$RECYCLE.BIN
21+
/package-lock.json
1722

1823
*.swp
1924

2025
# nyc test runner
2126
/.nyc_output
2227
/coverage
28+
29+
# preact-cli build size plugin
30+
size-plugin.json

.env.example

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ jobs:
7575
7676
- name: Load configuration
7777
run: |
78-
cp .env.example .env
79-
cp -r .rdeploy.example .rdeploy
80-
cp -r config/yml.example config/yml
78+
cp test/conf-test.yaml conf.d
8179
8280
- name: Run migrations
8381
run: |
84-
yarn migrate up
82+
yarn migrate
8583
8684
- name: Build
8785
run: |

.gitignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
# rDeploy files
2-
/.rdeploy
3-
41
npm-debug.log*
52
yarn-debug.log*
63
yarn-error.log*
74

85
/node_modules
96

107
/dist
11-
/build
128
/.env
139
/data
10+
/conf.d/*
11+
!/conf.d/.keep
12+
1413
# Upload provider dir
1514
/uploads
1615

17-
/config/yml/*.yml
18-
1916
.DS_Store
2017
Thumbs.db
2118
ehthumbs.db

.rdeploy.example/config.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

.rdeploy.example/files/example1.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.rdeploy.example/files/example2.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.rdeploy.example/files/example3.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

client/lib/loaders/mustache-config-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const mustache = require('mustache')
2-
const config = require('../../../config/client')
2+
const { default: config } = require('../../../dist/server/config/client')
33

44
module.exports = function (source) {
55
// FIXME: refactor this (copy-pasted from server)

client/src/api/profile.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import config from '../config'
21
import { request, handleResponse } from './util'
32

43
export const privateProfile = async () => {
@@ -8,7 +7,7 @@ export const privateProfile = async () => {
87
}
98

109
export const pendingPrivateProfile = async ({ authToken }) => {
11-
const { data } = await (await fetch(`${config.apiEndpoint}/users/me`, {
10+
const { data } = await (await fetch('/api/v1/users/me', {
1211
headers: {
1312
authorization: `Bearer ${authToken}`
1413
}

0 commit comments

Comments
 (0)