2022-04-22 13:07:57 -04:00
|
|
|
FROM python:3.9-alpine
|
|
|
|
|
2022-05-14 00:47:15 -04:00
|
|
|
RUN apk add tzdata build-base libffi-dev py3-cffi --no-cache
|
2022-04-22 13:07:57 -04:00
|
|
|
|
2022-05-20 12:20:08 -04:00
|
|
|
RUN mkdir -p /app/src
|
|
|
|
WORKDIR /app
|
|
|
|
|
2022-04-24 13:48:52 -04:00
|
|
|
ENV TZ=America/New_York
|
2022-05-20 12:20:08 -04:00
|
|
|
ENV VIRTUAL_ENV=/src/env
|
2022-04-22 13:07:57 -04:00
|
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
2022-05-20 12:20:08 -04:00
|
|
|
ENV BOT_CONFIG_DIR="../config"
|
|
|
|
ENV BOT_DB_URL="sqlite:///../config/sqlite.db"
|
|
|
|
ENV BOT_ALEMBIC_CONFIG="./src/alembic"
|
|
|
|
|
2022-04-22 13:07:57 -04:00
|
|
|
|
2022-04-24 12:10:37 -04:00
|
|
|
RUN python -m venv $VIRTUAL_ENV
|
2022-05-20 12:20:08 -04:00
|
|
|
COPY requirements.txt /app/
|
2022-04-22 13:07:57 -04:00
|
|
|
RUN pip3 install -r requirements.txt
|
|
|
|
|
2022-05-20 12:20:08 -04:00
|
|
|
|
|
|
|
COPY ./src/ /app/src/
|
|
|
|
COPY main.py /app/
|
2022-04-23 15:00:22 -04:00
|
|
|
VOLUME /config
|
|
|
|
|
2022-05-20 12:20:08 -04:00
|
|
|
CMD ["python3", "main.py"]
|