Inital Commit
This commit is contained in:
23
docker/app/Dockerfile
Normal file
23
docker/app/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
FROM python:3.11
|
||||
LABEL maintainer="Amritanshu <docker@tanshu.com>"
|
||||
|
||||
ADD https://git.tanshu.com/api/v1/repos/tanshu/gru/tags /tags.json
|
||||
RUN git clone --single-branch --depth 1 --branch latest https://git.tanshu.com/tanshu/gru.git /app
|
||||
|
||||
# Install Poetry
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=/opt/poetry python && \
|
||||
cd /usr/local/bin && \
|
||||
ln -s /opt/poetry/bin/poetry && \
|
||||
poetry config virtualenvs.create false
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Allow installing dev dependencies to run tests
|
||||
ARG INSTALL_DEV=false
|
||||
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi"
|
||||
|
||||
ENV PYTHONPATH=/app
|
||||
EXPOSE 80
|
||||
VOLUME /data
|
||||
|
||||
CMD ["poetry", "run", "python", "-m", "gru"]
|
||||
Reference in New Issue
Block a user