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

⚡ Allow passing overrides to frontend nginx config #3602

Closed
wants to merge 1 commit into from
Closed

⚡ Allow passing overrides to frontend nginx config #3602

wants to merge 1 commit into from

Conversation

m90
Copy link
Contributor

@m90 m90 commented Sep 5, 2023

Please provide enough information so that others can review your pull request:

This allows Docker users to mount an arbitrary number of additional nginx config files at /etc/nginx/overrides.d which will then be included in the configuration used. Passed config files take precedence over both the directives in the http block. The following server block could also be overwritten as the first match takes precedence.

Example in a compose setup:

  penpot_frontend:
    image: penpotapp/frontend:1.19.1
    networks:
      - penpot
      - penpot_public
    restart: unless-stopped
    volumes:
      - penpot_assets:/opt/data/assets
      - ./logging.conf:/etc/nginx/overrides.d/01logging.conf
    depends_on:
      - penpot_backend
      - penpot_exporter
    environment:
      PENPOT_FLAGS: >-
        disable-registration
        disable-login
        enable-login-with-password
      PENPOT_REDIS_URI: redis://penpot_redis/0
      PENPOT_BACKEND_URI: http://penpot_backend:6060
      PENPOT_EXPORTER_URI: http://penpot_exporter:6061

where logging.conf looks like

access_log off;

Users that don't use this feature will not be affected and do not need to change anything.

Explain the details for making this change. What existing problem does the pull request solve?

I would like to disable access logging for the frontend container as it is behind another reverse proxy anyways and logs can get quite noisy/heavy. access_log /dev/stdout is hard coded in the nginx config, so there is no way of configuring this currently.


I am not entirely sure if documentation lives in this repo as well and needs to be updated. In case yes, please lmk and I can do this still.

@niwinz niwinz self-assigned this Sep 5, 2023
@niwinz
Copy link
Contributor

niwinz commented Sep 6, 2023

Looks nice. I will target it to staging, for make it available faster for docker users.

@niwinz niwinz changed the base branch from develop to staging September 6, 2023 07:46
@niwinz niwinz changed the base branch from staging to develop September 6, 2023 07:47
@niwinz niwinz closed this Sep 6, 2023
@niwinz
Copy link
Contributor

niwinz commented Sep 6, 2023

Merged directly to staging using command line, thanks.

@niwinz
Copy link
Contributor

niwinz commented Sep 6, 2023

Feel free to open an other PR on penpot-docs if you consider that documentation should be updated

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