Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major enhancement to the docker setup and the config file #37

Merged
merged 13 commits into from
May 7, 2024
Merged

Major enhancement to the docker setup and the config file #37

merged 13 commits into from
May 7, 2024

Conversation

TheFrenchGhosty
Copy link
Contributor

@TheFrenchGhosty TheFrenchGhosty commented May 3, 2024

Supersede the changes made in #36

Changes based on https://github.com/PussTheCat-org/docker-priviblur-quay

TL;DR:

  • Massively enhance the example config file, dockerfile and the compose file (also make things work OOTB with docker)

Long version:

  • config file has been massively enhanced with documentation and now works OOTB with docker (host is now set to "0.0.0.0" by default since it's the standard) - comments "levels" have been standardized with one # for things that can be enabled and 2 for actual comments

  • Dockerfile has been redone from basically scratch and optimized in various ways (note: untested with the COPY since I clone the whole repo for my image, but you wanted it this way here, so I kept it this way)

  • Add some documentation to the compose file (Note the "Taken from" line about redis as been replaced by "Partially taken from" since parts of it was my work, remove version: "3" (deprecated since more than a year)


Note:

In the config file there's:

    # # If you're running Priviblur behind a remote proxy, one or more of the following must be set
    # # can also be set via env variables by captialzing and prefixing with PRIVIBLUR_
    # #
    # # For more information see
    # # https://sanic.dev/en/guide/advanced/proxy-headers.html
    # #
    # # Default: None
    # #
    # forwarded_secret =
    # real_ip_header =
    # proxies_count =

Looking at the sanic documentation "must be set" is just plain wrong.

  • forwarded_secret
    "In order to use the Forwarded header, you should set app.config.FORWARDED_SECRET to a value known to the trusted proxy server. The secret is used to securely identify a specific proxy server."

So this is basically useless?

  • real_ip_header

Might only be useful if you want priviblur to know the real IP of the user... which is basically useless?

  • proxies_count
    "Setting PROXIES_COUNT tells Sanic how deep to look to get an actual IP address for the client."

So it's only useful if you reverse proxy more than once... so useless for most people?

@syeopite
Copy link
Owner

syeopite commented May 3, 2024

Should this line be removed then?

# # If you're running Priviblur behind a remote proxy, one or more of the following must be set

I mostly just included it there due to this line in the documentation

Services behind reverse proxies must configure one or more of the following configuration values:

@TheFrenchGhosty
Copy link
Contributor Author

@syeopite From what I understand it's only if you want to pass the IP to the application (in this case Priviblur)... which seem highly useless in this case.

So I guess I can rewrite this part of the documentation to explain it like that?

@syeopite
Copy link
Owner

syeopite commented May 3, 2024

Can you just remove that entire section? I think I'll go just go ahead and remove those options entirely within the codebase since Priviblur does not need to know the users IP at all.

@TheFrenchGhosty
Copy link
Contributor Author

@syeopite Sure

@TheFrenchGhosty
Copy link
Contributor Author

@syeopite done

config.example.toml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants