Skip to content

Can't run webserver locally - file locations incorrect #211

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

Open
ajlennon opened this issue Apr 21, 2025 · 2 comments
Open

Can't run webserver locally - file locations incorrect #211

ajlennon opened this issue Apr 21, 2025 · 2 comments

Comments

@ajlennon
Copy link

ajlennon commented Apr 21, 2025

Hi there,

I added a docker-compose.yml so I could simply docker compose build and docker compose up to run the documentation webserver locally

This results in various files not being found as the scripts/docker/nginx.config configuration only maps the /docs location.

The fix is to modify the configuration as follows:

server {
    listen 8080 ;

    port_in_redirect off;
    location /docs {
        root /var/www;
        autoindex off;
        add_header 'Access-Control-Allow-Origin' '*';
    }
    location /css {
        root /var/www/docs;
        autoindex off;
        add_header 'Access-Control-Allow-Origin' '*';
    }
    location /js {
        root /var/www/docs;
        autoindex off;
        add_header 'Access-Control-Allow-Origin' '*';
    }
    location /img {
        root /var/www/docs;
        autoindex off;
        add_header 'Access-Control-Allow-Origin' '*';
    }

    location /healthz {
        return 200 'ok';
    }
}

The thing is that I see the CI pushes the built site and I don't know if these changes will break the deployment?

@ajlennon
Copy link
Author

Have raised a PR for discussion here #212

@DougReeder
Copy link
Contributor

This looks plausible, but I have a couple other things before I can look at this in depth.

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

No branches or pull requests

2 participants