27 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM python:3.10-slim
 | 
						|
 | 
						|
SHELL ["/bin/bash", "-c"]
 | 
						|
 | 
						|
RUN apt-get update && apt-get install -y --no-install-recommends wget     && mkdir -p /app/static     && wget -O /app/static/logo.png "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/logo.png"     && wget -O /app/static/logo_small.png "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/logo_small.png"     && wget -O /app/static/forgejo.svg "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/forgejo.svg"     && rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
RUN mkdir -p /app/data &&     chown -R 1000:1000 /app/data 
 | 
						|
 | 
						|
ENV TZ=
 | 
						|
RUN ln -snf /usr/share/zoneinfo/ /etc/localtime && echo  > /etc/timezone
 | 
						|
 | 
						|
 | 
						|
WORKDIR /app
 | 
						|
COPY requirements.txt .
 | 
						|
RUN pip install --no-cache-dir -r requirements.txt
 | 
						|
 | 
						|
COPY . .
 | 
						|
 | 
						|
ARG UID=1000
 | 
						|
ARG GID=1000
 | 
						|
RUN groupadd -g $GID appuser &&     useradd -u $UID -g $GID -m appuser &&     chown -R appuser:appuser /app
 | 
						|
 | 
						|
USER appuser
 | 
						|
 | 
						|
EXPOSE 5000
 | 
						|
 | 
						|
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]
 |