Skip to content

Commit

Permalink
Refactor TRAEFIK_PATH setup and add lets_encrypt flag
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Mar 9, 2024
1 parent 20e9653 commit cd5b543
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions imageroot/actions/create-module/20create-traefik-path
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def generate_random_hex_string(length):

# Talk with agent using file descriptor.
# Setup configuration from user input.
agent.set_env("TRAEFIK_PATH", generate_random_hex_string(50))
path = generate_random_hex_string(50)
agent.set_env("TRAEFIK_PATH", path)

# Make sure everything is saved inside the environment file
# just before starting systemd unit
Expand All @@ -42,8 +43,9 @@ response = agent.tasks.run(
data={
'instance': os.environ['MODULE_ID'],
'url': f'http://127.0.0.1:{os.environ["TCP_PORT"]}',
'path': path,
'http2https': True
'path': f'/{path}',
'http2https': True,
'lets_encrypt': False,
},
)

Expand Down

0 comments on commit cd5b543

Please sign in to comment.