Skip to content

Conversation

@pbaylas
Copy link

@pbaylas pbaylas commented Nov 26, 2025

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

When I was setting up swag_ondemand, it occurred to me that I'm basically duplicating the same information in the swag_ondemand_urls label that I've already set in swag_url label to make swag_auto_proxy so I figured it would make sense to do that automatically.

Benefits of this PR and context:

It makes using swag_ondemand and swag_auto_proxy slightly simpler to use together, and they already work great together. Plus it eliminates one place you might forget to update if you change the url of a container.

How Has This Been Tested?

I've manually tested it with all the containers I have swag_ondemand configured. I added logging so that it's clear what it's doing, and it's working for me with labels like this:

    container_name: openvscode-server
    labels:
      - swag=enable
      - swag_port=3000
      - swag_url=code.domain.net
      - swag_auth=authelia
      - swag_ondemand=enable
      - swag_server_custom_directive=include /config/nginx/ondemand.conf;
      - swag_location_custom_directive=error_page 502 = @waking_up;

Source / References:

@LinuxServer-CI
Copy link

PR build pushed to ghcr.io/linuxserver/mods:pull_request_1088

@quietsy
Copy link
Member

quietsy commented Nov 29, 2025

PR build pushed to ghcr.io/linuxserver/mods:pull_request_1088

You can test it by using this tag ^ in the DOCKER_MODS env var. (rebase it on latest first to avoid testing twice)

@LinuxServer-CI
Copy link

PR build pushed to ghcr.io/linuxserver/mods:pull_request_1088

@pbaylas pbaylas force-pushed the swag_ondemand_swag_urls branch from d7613a8 to 2b00859 Compare November 29, 2025 20:01
@LinuxServer-CI
Copy link

PR build pushed to ghcr.io/linuxserver/mods:pull_request_1088

@LinuxServer-CI
Copy link

PR build pushed to ghcr.io/linuxserver/mods:pull_request_1088

@LinuxServer-CI
Copy link

PR build pushed to ghcr.io/linuxserver/mods:pull_request_1088

@pbaylas
Copy link
Author

pbaylas commented Nov 29, 2025

PR build pushed to ghcr.io/linuxserver/mods:pull_request_1088

You can test it by using this tag ^ in the DOCKER_MODS env var. (rebase it on latest first to avoid testing twice)

Ah-ha! Very slick, thanks!

I've tested it now, and added some logging to make it clear which urls it's using, and it's working nicely for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants