Skip to content

Commit

Permalink
set umask on nginx (#2)
Browse files Browse the repository at this point in the history
* set umask on nginx

* set umask properly

* switch rest-tools to pypi

* add requests-mock

* define fixture as async

* missing import
  • Loading branch information
dsschult authored Aug 24, 2022
1 parent 448982e commit 4b129b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Dockerfile_nginx
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ COPY nginx_default.conf /etc/nginx/nginx.conf
# override this for customization (listen port, auth proxy)
COPY nginx_config.conf /etc/nginx/custom/webdav.conf

# set umask
RUN echo '#!/bin/sh\numask 002\nexec $@' >> /opt/entrypoint.sh && \
chmod +x /opt/entrypoint.sh

ENTRYPOINT ["/opt/entrypoint.sh"]

CMD ["nginx"]
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cryptography
pytest
pytest-asyncio
pytest-mock
requests-mock
coverage
flake8
-e git+https://github.com/WIPACrepo/rest-tools@v1.2.5#egg=rest_tools
wipac-rest-tools
3 changes: 2 additions & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from requests.exceptions import HTTPError
from rest_tools.client import AsyncSession
import requests_mock
import pytest_asyncio

from keycloak_http_auth.server import create_server

Expand All @@ -21,7 +22,7 @@ def port():
s.close()
return ephemeral_port

@pytest.fixture
@pytest_asyncio.fixture
async def server(monkeypatch, port, make_token, gen_jwk):
monkeypatch.setenv('DEBUG', 'True')
monkeypatch.setenv('PORT', str(port))
Expand Down

0 comments on commit 4b129b8

Please sign in to comment.