Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Serving static files from bare-metal nginx #2303

Closed
phrfpeixoto opened this issue May 31, 2020 · 2 comments
Closed

Serving static files from bare-metal nginx #2303

phrfpeixoto opened this issue May 31, 2020 · 2 comments
Labels

Comments

@phrfpeixoto
Copy link

Description

Hi,

I have an existing server running nginx in bare-metal, and I'm deploying Portus on it.
I wanted to have that nginx daemon serve the static files, but since I'm deploying Portus from docker-compose I'm facing some issues with accessibility.

The static volume is being mounted on /var/lib/docker/volumes/registry_static/_data, which nginx cannot read

Would you have a work around?

Steps to reproduce

  1. use this compose file: https://gist.github.com/phrfpeixoto/02080a601af9dbfad6e9ace920c0ae8d
  2. Use the provided nginx config, and point root to /var/lib/docker/volumes/registry_static/_data
  3. static files are unreachable
@dzhgenti
Copy link

Hey folks,

I'm also interested in this kind of setup.

I tried removing location block serving assets, hoping that portus will handle these requests but no luck.

 location ~ ^/(assets)/ {
        access_log off;
        gzip_static on;
        expires max;
        add_header Cache-Control public;
        add_header Last-Modified "";
        add_header ETag "";
        break;
    }

@stale
Copy link

stale bot commented Dec 25, 2020

Thanks for all your contributions!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Dec 25, 2020
@stale stale bot closed this as completed Jan 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants