An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: Force restart proxy on seeding
Andras Bacsaiabf0aeb2a85d
diff --git a/prisma/seed.cjs b/prisma/seed.cjsindex 30c4896c65..6dfa030d34 100644--- a/prisma/seed.cjs+++ b/prisma/seed.cjs@@ -74,6 +74,34 @@ async function main() {// Force stop Coolify Proxy, as it had a bug in < 2.9.2. TrustProxy + api.insecuretry {await asyncExecShell(`docker stop -t 0 coolify-proxy && docker rm coolify-proxy`);+ const { stdout: Config } = await asyncExecShell(+ `docker network inspect bridge --format '{{json .IPAM.Config }}'`+ );+ const ip = JSON.parse(Config)[0].Gateway;+ await asyncExecShell(+ `docker run --restart always \+ --add-host 'host.docker.internal:host-gateway' \+ --add-host 'host.docker.internal:${ip}' \+ -v coolify-traefik-letsencrypt:/etc/traefik/acme \+ -v /var/run/docker.sock:/var/run/docker.sock \+ --network coolify-infra \+ -p "80:80" \+ -p "443:443" \+ --name coolify-proxy \+ -d traefik:v2.6 \+ --entrypoints.web.address=:80 \+ --entrypoints.web.forwardedHeaders.insecure=true \+ --entrypoints.websecure.address=:443 \+ --entrypoints.websecure.forwardedHeaders.insecure=true \+ --providers.docker=true \+ --providers.docker.exposedbydefault=false \+ --providers.http.endpoint=http://coolify:3000/webhooks/traefik/main.json \+ --providers.http.pollTimeout=5s \+ --certificatesresolvers.letsencrypt.acme.httpchallenge=true \+ --certificatesresolvers.letsencrypt.acme.storage=/etc/traefik/acme/acme.json \+ --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web \+ --log.level=error`+ );} catch (error) {console.log(error);}