mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Automated all distribution files
This commit is contained in:
26
Dockerfile
26
Dockerfile
@@ -6,23 +6,21 @@ FROM python:3-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# this should change rarely, can be cached
|
||||
COPY ./requirements.txt ./requirements.txt
|
||||
|
||||
# Copy project into dir
|
||||
COPY . .
|
||||
|
||||
# Install everything before copying rest of the project, can be cached
|
||||
RUN \
|
||||
# Build dependencies (This will pipe all packages from the file)
|
||||
sed 's/#.*//' ./install/dependencies_build.txt | xargs apk add --no-cache --virtual .build-deps && \
|
||||
# Runtime dependencies (Same)
|
||||
sed 's/#.*//' ./install/dependencies_run.txt | xargs apk add --no-cache && \
|
||||
# Python dependencies
|
||||
pip3 install --no-cache-dir -r requirements.txt && \
|
||||
# Local project install
|
||||
pip3 install /usr/src/app && \
|
||||
# Remove build dependencies
|
||||
apk del .build-deps
|
||||
apk add --no-cache --virtual .build-deps gcc python3-dev libxml2-dev libxslt-dev libffi-dev libc-dev py3-pip linux-headers && \
|
||||
apk add --no-cache python3 tzdata vips && \
|
||||
pip3 install --no-cache-dir -r requirements.txt && \
|
||||
apk del .build-deps
|
||||
|
||||
# expected behavior for a default setup is for maloja to "just work"
|
||||
|
||||
COPY . .
|
||||
RUN pip3 install /usr/src/app
|
||||
|
||||
# Docker-specific configuration and default to IPv4
|
||||
ENV MALOJA_SKIP_SETUP=yes
|
||||
ENV MALOJA_HOST=0.0.0.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user