fix: Register should happen if coolify proxy cannot be started

This commit is contained in:
Andras Bacsai 2022-04-13 14:23:42 +02:00
parent c1adffe260
commit 1971f227fd

View File

@ -46,8 +46,12 @@ export async function login({
if (users === 0) {
await prisma.setting.update({ where: { id }, data: { isRegistrationEnabled: false } });
// Create default network & start Coolify Proxy
await asyncExecShell(`docker network create --attachable coolify`);
await startCoolifyProxy('/var/run/docker.sock');
try {
await asyncExecShell(`docker network create --attachable coolify`);
} catch (error) {}
try {
await startCoolifyProxy('/var/run/docker.sock');
} catch (error) {}
uid = '0';
}