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

Cannot run deployment server #10

Open
tyalie opened this issue Oct 16, 2020 · 3 comments
Open

Cannot run deployment server #10

tyalie opened this issue Oct 16, 2020 · 3 comments

Comments

@tyalie
Copy link

tyalie commented Oct 16, 2020

Thanks a lot. The tool is exactly what we need for managing our snacks and drinks in our org.

I've successfully used it with the development server, but when I try to use the deployment server I run into issues.

At first I got this issue: https://stackoverflow.com/questions/15878176/uwsgi-invalid-request-block-size
The fix recommended there worked, but afterwards everything except root returned a 500 server error.

Am I right to assume, that the deployment functions are never used by you? I'm just curious, I can work with it only running in dev mode.

@ibot3
Copy link
Member

ibot3 commented Oct 17, 2020

We are using the production server with an nginx that is configured as following:

location /drinkman {
            uwsgi_pass uwsgi://[IP]:[Port];
            include uwsgi_params;
            uwsgi_param SCRIPT_NAME /drinkman;
            # Basic Auth
}

Where uwsgi_params is a file with this content:

uwsgi_param  QUERY_STRING       $query_string;
uwsgi_param  REQUEST_METHOD     $request_method;
uwsgi_param  CONTENT_TYPE       $content_type;
uwsgi_param  CONTENT_LENGTH     $content_length;

uwsgi_param  REQUEST_URI        $request_uri;
uwsgi_param  PATH_INFO          $document_uri;
uwsgi_param  DOCUMENT_ROOT      $document_root;
uwsgi_param  SERVER_PROTOCOL    $server_protocol;
uwsgi_param  REQUEST_SCHEME     $scheme;
uwsgi_param  HTTPS              $https if_not_empty;

uwsgi_param  REMOTE_ADDR        $remote_addr;
uwsgi_param  REMOTE_PORT        $remote_port;
uwsgi_param  SERVER_PORT        $server_port;
uwsgi_param  SERVER_NAME        $server_name;

# SSL Settings
uwsgi_ssl_protocols TLSv1.2;
# Verify peer
uwsgi_ssl_verify on;
# Use client certificate
uwsgi_ssl_certificate /etc/ssl/[...].crt;
uwsgi_ssl_certificate_key /etc/ssl/private/[...].key;

You can try setting DJANGO_DEV: 'true' in the docker-compose.yml environment. This will show you the error instead of an 500.

@tyalie
Copy link
Author

tyalie commented Oct 17, 2020

Thanks

@MarauderXtreme
Copy link
Member

Maybe a good idea to add this in some way to the README or any other documentation?
I think we would accept a PR if it enhances said things.

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

3 participants