implement docker service discovery via labels

This commit is contained in:
Ben Phelps 2022-09-09 21:53:05 +03:00
parent ef1c5dbcc9
commit d66326b41d
8 changed files with 145 additions and 39 deletions

View file

@ -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) {