This commit is contained in:
Andras Bacsai 2022-10-21 20:54:33 +02:00
parent 5d60b5eb8b
commit 55fc3920fc
3 changed files with 18 additions and 26 deletions

View File

@ -226,16 +226,12 @@ export async function getTemplates() {
"ports": [ "ports": [
"80" "80"
], ],
"proxy": { "proxy": [
"traefik": {
"configurations": [
{ {
"domain": "$$config_coolify_fqdn_appwrite", "domain": "$$config_coolify_fqdn_appwrite",
"port": "80" "port": "80"
} }
] ]
}
}
}, },
"$$id-executor": { "$$id-executor": {
"image": "appwrite/appwrite:$$core_version", "image": "appwrite/appwrite:$$core_version",
@ -352,16 +348,12 @@ export async function getTemplates() {
], ],
"volumes": [], "volumes": [],
"entrypoint": "realtime", "entrypoint": "realtime",
"proxy": { "proxy": [
"traefik": {
"configurations": [
{ {
"port": "80", "port": "80",
"pathPrefix": "/v1/realtime" "pathPrefix": "/v1/realtime"
} }
] ]
}
}
}, },
"$$id-redis": { "$$id-redis": {
"image": "redis:7.0.4-alpine", "image": "redis:7.0.4-alpine",

View File

@ -146,8 +146,8 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
} }
} }
// TODO: seconday domains are not working - kinda working // TODO: seconday domains are not working - kinda working
if (value?.proxy?.traefik?.configurations) { if (value?.proxy && value.proxy.length > 0) {
for (const proxyValue of value.proxy.traefik.configurations) { for (const proxyValue of value.proxy) {
if (proxyValue.domain) { if (proxyValue.domain) {
const variable = foundTemplate.variables.find(v => v.id === proxyValue.domain) const variable = foundTemplate.variables.find(v => v.id === proxyValue.domain)
if (variable) { if (variable) {

View File

@ -384,8 +384,8 @@ export async function traefikConfiguration(request, reply) {
for (const oneService of Object.keys(found.services)) { for (const oneService of Object.keys(found.services)) {
const isProxyConfiguration = found.services[oneService].proxy; const isProxyConfiguration = found.services[oneService].proxy;
if (isProxyConfiguration) { if (isProxyConfiguration) {
const { proxy: { traefik: { configurations } } } = found.services[oneService]; const { proxy } = found.services[oneService];
for (const configuration of configurations) { for (const configuration of proxy) {
const publicPort = service[type]?.publicPort; const publicPort = service[type]?.publicPort;
if (fqdn) { if (fqdn) {
data.services.push({ data.services.push({