mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-29 20:52:10 +00:00
fix: Minio urls + domain checks
This commit is contained in:
@@ -9,12 +9,17 @@ export const post: RequestHandler = async (event) => {
|
||||
|
||||
const { id } = event.params;
|
||||
|
||||
let { name, fqdn, exposePort } = await event.request.json();
|
||||
let {
|
||||
name,
|
||||
fqdn,
|
||||
exposePort,
|
||||
minio: { apiFqdn }
|
||||
} = await event.request.json();
|
||||
if (fqdn) fqdn = fqdn.toLowerCase();
|
||||
if (exposePort) exposePort = Number(exposePort);
|
||||
|
||||
if (apiFqdn) apiFqdn = apiFqdn.toLowerCase();
|
||||
try {
|
||||
await db.updateService({ id, fqdn, name, exposePort });
|
||||
await db.updateMinioService({ id, fqdn, apiFqdn, name, exposePort });
|
||||
return { status: 201 };
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
|
||||
@@ -34,7 +34,6 @@ export const post: RequestHandler = async (event) => {
|
||||
const publicPort = await getFreePort();
|
||||
|
||||
const consolePort = 9001;
|
||||
const apiPort = 9000;
|
||||
|
||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||
const image = getServiceImage(type);
|
||||
@@ -93,7 +92,7 @@ export const post: RequestHandler = async (event) => {
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull`);
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||
await db.updateMinioService({ id, publicPort });
|
||||
await db.updateMinioServicePort({ id, publicPort });
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user