fix: expose ports for services
This commit is contained in:
parent
409a5b9f99
commit
5e340a4cdd
@ -103,7 +103,10 @@ export async function startService(request: FastifyRequest<ServiceStartStop>, fa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let port = null
|
||||||
|
if (template.services[s].ports?.length > 0) {
|
||||||
|
port = template.services[s].ports[0]
|
||||||
|
}
|
||||||
config[s] = {
|
config[s] = {
|
||||||
container_name: s,
|
container_name: s,
|
||||||
build: template.services[s].build || undefined,
|
build: template.services[s].build || undefined,
|
||||||
@ -111,7 +114,7 @@ export async function startService(request: FastifyRequest<ServiceStartStop>, fa
|
|||||||
entrypoint: template.services[s]?.entrypoint,
|
entrypoint: template.services[s]?.entrypoint,
|
||||||
image: arm ? template.services[s].imageArm : template.services[s].image,
|
image: arm ? template.services[s].imageArm : template.services[s].image,
|
||||||
expose: template.services[s].ports,
|
expose: template.services[s].ports,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${exposePort}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
volumes: Array.from(volumes),
|
volumes: Array.from(volumes),
|
||||||
environment: newEnvironments,
|
environment: newEnvironments,
|
||||||
depends_on: template.services[s]?.depends_on,
|
depends_on: template.services[s]?.depends_on,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user