Skip to content

Commit

Permalink
implement app base url and app port
Browse files Browse the repository at this point in the history
  • Loading branch information
compgeniuses committed Jan 28, 2024
1 parent 93f126d commit d6eb026
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ buildah config --entrypoint=/ \
--label="org.nethserver.images=docker.io/postgres:16 docker.io/joplin/server:latest" \
"${container}"
# --label="org.nethserver.images=docker.io/postgres:16 docker.io/florider89/joplin-server:latest" \
# --label="org.nethserver.images=docker.io/postgres:16 docker.io/etechonomy/joplin-server:latest" \
# Commit the image
buildah commit "${container}" "${repobase}/${reponame}"

Expand Down
12 changes: 11 additions & 1 deletion imageroot/actions/configure-module/10configure_environment_vars
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ data = json.load(sys.stdin)
# agent.set_env("AUXILIARYACCOUNT",data.get("auxiliary_account",True))
# agent.set_env("ACTIVESYNC",data.get("activesync",False))

# joplin url settings
host = data.get("host", "")
TCP_PORT = data.get("TCP_PORT", "")
APP_BASE_URL = "https://"+host
APP_PORT = TCP_PORT

# DB Config
POSTGRES_DB = data.get("POSTGRES_DB", "joplin")
POSTGRES_USER = data.get("POSTGRES_USER", "joplin")
Expand All @@ -38,8 +44,12 @@ db_config = {
"POSTGRES_USER": POSTGRES_USER,
"POSTGRES_PASSWORD": POSTGRES_PASSWORD,
}

agent.write_envfile('database.env', db_config)
# Make sure everything is saved inside the environment file
# just before starting systemd unit

#joplin url settings
agent.set_env("APP_BASE_URL", APP_BASE_URL)
agent.set_env("APP_PORT", APP_PORT)

agent.dump_env()

0 comments on commit d6eb026

Please sign in to comment.