mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-19 12:33:11 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
726fbbb52a | ||
|
|
29d2278579 | ||
|
|
72ceeff022 | ||
|
|
54d65ec011 | ||
|
|
96aef5c4a6 |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"version": "2.2.4",
|
"version": "2.2.6",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev",
|
"dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ frontend http
|
|||||||
bind :80
|
bind :80
|
||||||
bind :443 ssl crt /usr/local/etc/haproxy/ssl/ alpn h2,http/1.1
|
bind :443 ssl crt /usr/local/etc/haproxy/ssl/ alpn h2,http/1.1
|
||||||
acl is_certbot path_beg /.well-known/acme-challenge/
|
acl is_certbot path_beg /.well-known/acme-challenge/
|
||||||
|
|
||||||
{{#applications}}
|
{{#applications}}
|
||||||
{{#isHttps}}
|
{{#isHttps}}
|
||||||
http-request redirect scheme https code ${
|
http-request redirect scheme https code ${
|
||||||
@@ -43,6 +44,7 @@ frontend http
|
|||||||
dev ? 302 : 301
|
dev ? 302 : 301
|
||||||
} if { req.hdr(host) -i {{redirectTo}} }
|
} if { req.hdr(host) -i {{redirectTo}} }
|
||||||
{{/applications}}
|
{{/applications}}
|
||||||
|
|
||||||
{{#services}}
|
{{#services}}
|
||||||
{{#isHttps}}
|
{{#isHttps}}
|
||||||
http-request redirect scheme https code ${
|
http-request redirect scheme https code ${
|
||||||
@@ -53,6 +55,7 @@ frontend http
|
|||||||
dev ? 302 : 301
|
dev ? 302 : 301
|
||||||
} if { req.hdr(host) -i {{redirectTo}} }
|
} if { req.hdr(host) -i {{redirectTo}} }
|
||||||
{{/services}}
|
{{/services}}
|
||||||
|
|
||||||
{{#coolify}}
|
{{#coolify}}
|
||||||
{{#isHttps}}
|
{{#isHttps}}
|
||||||
http-request redirect scheme https code ${
|
http-request redirect scheme https code ${
|
||||||
@@ -63,6 +66,7 @@ frontend http
|
|||||||
dev ? 302 : 301
|
dev ? 302 : 301
|
||||||
} if { req.hdr(host) -i {{redirectTo}} }
|
} if { req.hdr(host) -i {{redirectTo}} }
|
||||||
{{/coolify}}
|
{{/coolify}}
|
||||||
|
|
||||||
use_backend backend-certbot if is_certbot
|
use_backend backend-certbot if is_certbot
|
||||||
use_backend %[req.hdr(host),lower]
|
use_backend %[req.hdr(host),lower]
|
||||||
|
|
||||||
@@ -82,6 +86,13 @@ backend backend-certbot
|
|||||||
# updatedAt={{updatedAt}}
|
# updatedAt={{updatedAt}}
|
||||||
backend {{domain}}
|
backend {{domain}}
|
||||||
option forwardfor
|
option forwardfor
|
||||||
|
{{#isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Proto https
|
||||||
|
{{/isHttps}}
|
||||||
|
{{^isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Proto http
|
||||||
|
{{/isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Host %[req.hdr(host),lower]
|
||||||
server {{id}} {{id}}:{{port}}
|
server {{id}} {{id}}:{{port}}
|
||||||
{{/isRunning}}
|
{{/isRunning}}
|
||||||
{{/applications}}
|
{{/applications}}
|
||||||
@@ -91,6 +102,13 @@ backend {{domain}}
|
|||||||
# updatedAt={{updatedAt}}
|
# updatedAt={{updatedAt}}
|
||||||
backend {{domain}}
|
backend {{domain}}
|
||||||
option forwardfor
|
option forwardfor
|
||||||
|
{{#isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Proto https
|
||||||
|
{{/isHttps}}
|
||||||
|
{{^isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Proto http
|
||||||
|
{{/isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Host %[req.hdr(host),lower]
|
||||||
server {{id}} {{id}}:{{port}}
|
server {{id}} {{id}}:{{port}}
|
||||||
{{/isRunning}}
|
{{/isRunning}}
|
||||||
{{/services}}
|
{{/services}}
|
||||||
@@ -99,6 +117,13 @@ backend {{domain}}
|
|||||||
backend {{domain}}
|
backend {{domain}}
|
||||||
option forwardfor
|
option forwardfor
|
||||||
option httpchk GET /undead.json
|
option httpchk GET /undead.json
|
||||||
|
{{#isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Proto https
|
||||||
|
{{/isHttps}}
|
||||||
|
{{^isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Proto http
|
||||||
|
{{/isHttps}}
|
||||||
|
http-request add-header X-Forwarded-Host %[req.hdr(host),lower]
|
||||||
server {{id}} {{id}}:{{port}} check fall 10
|
server {{id}} {{id}}:{{port}} check fall 10
|
||||||
{{/coolify}}
|
{{/coolify}}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -66,15 +66,10 @@ export const post: RequestHandler = async (event) => {
|
|||||||
const { fqdn, isRegistrationEnabled, dualCerts, minPort, maxPort } = await event.request.json();
|
const { fqdn, isRegistrationEnabled, dualCerts, minPort, maxPort } = await event.request.json();
|
||||||
try {
|
try {
|
||||||
const { id } = await db.listSettings();
|
const { id } = await db.listSettings();
|
||||||
if (isRegistrationEnabled) {
|
await db.prisma.setting.update({ where: { id }, data: { isRegistrationEnabled, dualCerts } });
|
||||||
await db.prisma.setting.update({ where: { id }, data: { isRegistrationEnabled } });
|
|
||||||
}
|
|
||||||
if (fqdn) {
|
if (fqdn) {
|
||||||
await db.prisma.setting.update({ where: { id }, data: { fqdn } });
|
await db.prisma.setting.update({ where: { id }, data: { fqdn } });
|
||||||
}
|
}
|
||||||
if (dualCerts) {
|
|
||||||
await db.prisma.setting.update({ where: { id }, data: { dualCerts } });
|
|
||||||
}
|
|
||||||
if (minPort && maxPort) {
|
if (minPort && maxPort) {
|
||||||
await db.prisma.setting.update({ where: { id }, data: { minPort, maxPort } });
|
await db.prisma.setting.update({ where: { id }, data: { minPort, maxPort } });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user