mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
implement docker service discovery via labels
This commit is contained in:
parent
ef1c5dbcc9
commit
d66326b41d
8 changed files with 145 additions and 39 deletions
|
@ -1,15 +1,15 @@
|
|||
import path from "path";
|
||||
import { promises as fs } from "fs";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
import yaml from "js-yaml";
|
||||
|
||||
import checkAndCopyConfig from "utils/config";
|
||||
|
||||
export default async function getDockerArguments(server) {
|
||||
export default function getDockerArguments(server) {
|
||||
checkAndCopyConfig("docker.yaml");
|
||||
|
||||
const configFile = path.join(process.cwd(), "config", "docker.yaml");
|
||||
const configData = await fs.readFile(configFile, "utf8");
|
||||
const configData = readFileSync(configFile, "utf8");
|
||||
const servers = yaml.load(configData);
|
||||
|
||||
if (!server) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue