Fix some stiff
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
Fabian Stamm 2023-11-29 01:17:19 +01:00
parent 9234efab2a
commit 36304b8873
7 changed files with 32 additions and 36 deletions

View File

@ -1,3 +0,0 @@
{
"url": "https://drone.hibas123.de/OpenServer/OpenAuth_server/"
}

View File

@ -1,21 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: Build docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
auto_tag: true
repo: docker.hibas123.de/authserver
registry: docker.hibas123.de
debug: true
when:
branch: [master]
event:
exclude:
- pull_request

1
Backend/.dockerignore Normal file
View File

@ -0,0 +1 @@
config.ini

View File

@ -10,6 +10,8 @@ dotenv.config();
export interface DatabaseConfig {
host: string;
database: string;
username?: string;
password?: string;
}
export interface WebConfig {
@ -57,6 +59,14 @@ const config = (parse(
type: String,
default: "localhost",
},
username: {
type: String,
optional: true,
},
password: {
type: String,
optional: true,
},
},
web: {
port: {

View File

@ -7,7 +7,16 @@ if (Config.database) {
if (Config.database.host) host = Config.database.host;
}
if (Config.core.dev) dbname += "_dev";
const DB = new SafeMongo("mongodb://" + host, dbname, {
let auth = undefined;
if (Config.database.username) {
auth = {
username: Config.database.username,
password: Config.database.password
}
}
const DB = new SafeMongo("mongodb://" + host, dbname, {
auth
});
export default DB;

View File

@ -11,6 +11,7 @@ build:
RUN yarn build
SAVE ARTIFACT /build/_API /API
SAVE ARTIFACT /build/Backend/lib /Backend
SAVE ARTIFACT /build/Frontend/build /Frontend
SAVE ARTIFACT /build/FrontendLegacy/out /FrontendLegacy
@ -26,6 +27,7 @@ docker:
# COPY ./supervisord.conf /etc/supervisord.conf
COPY +build/API /build/_API
COPY +build/Backend /build/Backend/lib
COPY +build/Frontend /build/Frontend/build
COPY +build/FrontendLegacy /build/FrontendLegacy/out

View File

@ -2,18 +2,25 @@
"name": "@hibas123/openauth-views-v2",
"main": "index.js",
"devDependencies": {
"@hibas123/openauth-internalapi": "workspace:^",
"@hibas123/theme": "^2.0.6",
"@hibas123/utils": "^2.2.18",
"@popperjs/core": "^2.11.7",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-html": "^1.0.2",
"@rollup/plugin-image": "^3.0.2",
"@rollup/plugin-node-resolve": "^15.0.2",
"@simplewebauthn/browser": "^7.2.0",
"@tsconfig/svelte": "^4.0.1",
"@types/cleave.js": "^1.4.7",
"autoprefixer": "^10.4.14",
"classnames": "^2.3.2",
"cleave.js": "^1.6.0",
"cssnano": "^6.0.0",
"esbuild": "^0.17.16",
"flowbite": "^1.6.5",
"flowbite-svelte": "^0.34.9",
"joi": "^17.9.1",
"postcss": "^8.4.21",
"postcss-import": "^15.1.0",
"postcss-url": "^10.1.3",
@ -28,21 +35,12 @@
"svelte": "^3.58.0",
"svelte-preprocess": "^5.0.3",
"tailwindcss": "^3.3.1",
"typescript": "^5.0.4"
"typescript": "^5.0.4",
"what-the-pack": "^2.0.3"
},
"scripts": {
"prepublishOnly": "npm run build",
"build": "rollup -c rollup.config.mjs ",
"dev": "rollup -c rollup.config.mjs -w"
},
"dependencies": {
"@hibas123/openauth-internalapi": "workspace:^",
"@hibas123/theme": "^2.0.6",
"@hibas123/utils": "^2.2.18",
"@rollup/plugin-commonjs": "^24.0.1",
"@simplewebauthn/browser": "^7.2.0",
"cleave.js": "^1.6.0",
"joi": "^17.9.1",
"what-the-pack": "^2.0.3"
}
}