You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
797 B

# Docker image for production environment.
# You should NOT publish this image.
FROM almalinux/almalinux:8
RUN groupadd -g 900 web && \
useradd -d /app -M -r -s /bin/bash web -g 900 -u 900
RUN dnf -y install \
gcc \
make \
gettext \
python38 \
python38-devel \
mariadb-devel
COPY tmp/deploy /app
WORKDIR /app
# Use our local env
ENV PYTHONPATH=/app/.local/lib/python3.8/site-packages:$PYTHONPATH
ENV PATH=/app/.local/bin:$PATH
# Remove static images from build
RUN rm -rf /app/public/* \
# Fix perms
&& chown web:web -Rf /app \
# Install dependencies
&& su - web -c 'pip3 install -r requirements.txt --user' \
# Cleanup dependencies
&& dnf -y remove gcc \
&& dnf -y clean all \
&& rm -rf /var/cache/yum
CMD su web -c 'make uwsgi'