FROM python:alpine

RUN apk add --no-cache \
    bash sqlite

WORKDIR /app
COPY . .
RUN adduser -D bbj
RUN chown -R bbj:bbj .

USER bbj
RUN /bin/bash /app/setup.sh

EXPOSE 7099
ENV PORT=7099
ENV HOST=0.0.0.0
ENV INSTANCE_NAME=BBJ
ENV ALLOW_ANON=true
ENV DEBUG=false
ENV ADMINS=

ENTRYPOINT ["/bin/sh", "/app/docker-entrypoint.sh"]
