And mapped user permissions
This commit is contained in:
		| @@ -77,7 +77,7 @@ services: | ||||
|   news_check: # Creates a small webapp on http://localhost:8080 to check previously generated pdfs (some of which are unusable and must be marked as such) | ||||
|     build: news_check | ||||
|     image: news_check:latest | ||||
|     # user: 1001:1001 # since the app writes files to the local filesystem, it must be run as the current user | ||||
|     user: 1000:1000 # since the app writes files to the local filesystem, it must be run as the current user | ||||
|     depends_on: | ||||
|       - db_passthrough | ||||
|     volumes: | ||||
|   | ||||
| @@ -5,15 +5,15 @@ ENV TZ Europe/Zurich | ||||
| RUN apt-get update && apt-get install -y ghostscript | ||||
| # for compression of pdfs | ||||
|  | ||||
| RUN useradd --create-home --shell /bin/bash --uid 1001 autonews | ||||
| # RUN useradd --create-home --shell /bin/bash --uid 1001 autonews | ||||
| # id mapped to local user | ||||
| # home directory needed for pip package installation | ||||
| RUN export PATH=/home/autonews/.local/bin:$PATH | ||||
| # RUN export PATH=/home/autonews/.local/bin:$PATH | ||||
|  | ||||
|  | ||||
| RUN mkdir -p /app/auto_news | ||||
| RUN chown -R autonews:autonews /app | ||||
| USER autonews | ||||
| # RUN chown -R autonews:autonews /app | ||||
| # USER autonews | ||||
|  | ||||
| COPY requirements.txt /app/requirements.txt | ||||
| RUN python3 -m pip install -r /app/requirements.txt | ||||
|   | ||||
		Reference in New Issue
	
	Block a user