forked from michael.heier/citadel-core
Publish a beta of 0.0.5 to the beta channel (#46)
This commit is contained in:
parent
ce71560ef0
commit
02fdae4971
|
@ -47,7 +47,7 @@ def getContainerHiddenService(
|
|||
if isinstance(container.hiddenServicePorts, int):
|
||||
return getHiddenServiceString(
|
||||
"{} {}".format(metadata.name, container.name),
|
||||
metadata.id,
|
||||
metadata.id if isMainContainer else "{}-{}".format(metadata.id, container.name),
|
||||
container.hiddenServicePorts,
|
||||
containerIp,
|
||||
container.hiddenServicePorts,
|
||||
|
@ -55,7 +55,7 @@ def getContainerHiddenService(
|
|||
elif isinstance(container.hiddenServicePorts, list):
|
||||
return getHiddenServiceMultiPort(
|
||||
"{} {}".format(metadata.name, container.name),
|
||||
metadata.id,
|
||||
metadata.id if isMainContainer else "{}-{}".format(metadata.id, container.name),
|
||||
containerIp,
|
||||
container.hiddenServicePorts,
|
||||
)
|
||||
|
@ -77,14 +77,14 @@ def getContainerHiddenService(
|
|||
else:
|
||||
additionalHiddenServices[key] = value
|
||||
for key, value in additionalHiddenServices.items():
|
||||
otherHiddenServices += "\n"
|
||||
if isinstance(value, int):
|
||||
otherHiddenServices += "# {} {} {} Hidden Service\nHiddenServiceDir /var/lib/tor/app-{}-{}\n".format(
|
||||
metadata.name, container.name, key, metadata.id, container.name
|
||||
metadata.name, container.name, key, metadata.id, key
|
||||
)
|
||||
otherHiddenServices += "HiddenServicePort {} {}:{}".format(
|
||||
value, containerIp, value
|
||||
)
|
||||
otherHiddenServices += "\n"
|
||||
elif isinstance(value, list):
|
||||
otherHiddenServices += getHiddenServiceMultiPort(
|
||||
"{} {}".format(metadata.name, key), "{}-{}".format(metadata.id, key), containerIp, value
|
||||
|
|
|
@ -85,11 +85,12 @@ def createComposeConfigFromV3(app: dict, nodeRoot: str):
|
|||
newApp = configureIps(newApp, networkingFile, envFile)
|
||||
# This is validated earlier
|
||||
for container in newApp.containers:
|
||||
container.ports = container.requiredPorts
|
||||
for tcpPort in container.requiredPorts:
|
||||
container.ports.append("{}:{}".format(tcpPort, tcpPort))
|
||||
del container.requiredPorts
|
||||
for container in newApp.containers:
|
||||
for udpPort in container.requiredUdpPorts:
|
||||
container.ports.append("{}/udp".format(udpPort))
|
||||
container.ports.append("{}/udp:{}/udp".format(udpPort, udpPort))
|
||||
del container.requiredUdpPorts
|
||||
newApp = configureMainPort(newApp, nodeRoot)
|
||||
newApp = configureHiddenServices(newApp, nodeRoot)
|
||||
|
|
|
@ -77,6 +77,8 @@ def configureMainPort(app: AppStage2, nodeRoot: str) -> AppStage3:
|
|||
# If it doesn't contain a :, it's the port itself
|
||||
if mainPort == False:
|
||||
mainPort = mainContainer.ports[0]
|
||||
if mainPort.find(":") != -1:
|
||||
mainPort = mainPort.split(":")[1]
|
||||
else:
|
||||
mainContainer.ports = [portToAppend]
|
||||
|
||||
|
|
|
@ -7,11 +7,8 @@ import yaml
|
|||
from jsonschema import validate
|
||||
import yaml
|
||||
|
||||
|
||||
# Validates app data
|
||||
# Returns true if valid, false otherwise
|
||||
scriptDir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..")
|
||||
def validateApp(app: dict):
|
||||
|
||||
with open(os.path.join(scriptDir, 'app-standard-v1.yml'), 'r') as f:
|
||||
schemaVersion1 = yaml.safe_load(f)
|
||||
with open(os.path.join(scriptDir, 'app-standard-v2.yml'), 'r') as f:
|
||||
|
@ -19,6 +16,9 @@ def validateApp(app: dict):
|
|||
with open(os.path.join(scriptDir, 'app-standard-v3.yml'), 'r') as f:
|
||||
schemaVersion3 = yaml.safe_load(f)
|
||||
|
||||
# Validates app data
|
||||
# Returns true if valid, false otherwise
|
||||
def validateApp(app: dict):
|
||||
if 'version' in app and str(app['version']) == "1":
|
||||
try:
|
||||
validate(app, schemaVersion1)
|
||||
|
|
|
@ -100,7 +100,7 @@ services:
|
|||
ipv4_address: $LND_IP
|
||||
dashboard:
|
||||
container_name: dashboard
|
||||
image: ghcr.io/runcitadel/dashboard:v0.0.12@sha256:102a44b938765be8224c63785949b90bf796670f01aef4e282d58a4c26a42595
|
||||
image: ghcr.io/runcitadel/dashboard:v0.0.13@sha256:86be4a105e9599163866d2e4f79c4d4ab9725ce56d71d7d7341e4d0ab3441b54
|
||||
restart: on-failure
|
||||
stop_grace_period: 1m30s
|
||||
networks:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": "0.0.4-rc.1",
|
||||
"name": "Citadel 0.0.4 Release Candidate 1",
|
||||
"version": "0.0.5-rc.1",
|
||||
"name": "Citadel 0.0.5-rc.1",
|
||||
"requires": ">=0.0.1",
|
||||
"notes": "This update fixes multiple bugs in the 0.0.4 release."
|
||||
"notes": "This update fixes a few bugs in the 0.0.4 release that were preventing some apps from working correctly."
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user