forked from joshuabach/gnucash-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (28 loc) · 806 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.11-alpine AS builder
LABEL authors="freddo"
WORKDIR /srv/
RUN apk add \
gcc \
musl-dev \
mariadb-dev \
python3-dev \
libpq-dev
RUN pip wheel --no-cache-dir --wheel-dir /wheels mysql pycryptodome psycopg2
FROM python:3.11-alpine
WORKDIR /srv/
COPY ./src/ ./
COPY ./README.md ./
COPY --from=builder /wheels /wheels
RUN apk add libpq mariadb-client mariadb-dev
RUN pip install -v --no-cache /wheels/* .[pgsql,mysql] gunicorn
RUN rm -r /wheels
EXPOSE 8000
ENV SECRET_KEY='00000000000000000000000000000000'
ENV LOG_LEVEL='WARN'
ENV DB_DRIVER='sqlite'
ENV DB_NAME='/gnucash.sqlite'
ENV DB_HOST='localhost'
ENV AUTH_MECHANISM=''
ENV TRANSACTION_PAGE_LENGTH=25
ENV PRESELECTED_CONTRA_ACCOUNT=''
ENTRYPOINT ["gunicorn", "-b", "0.0.0.0", "gnucash_web.wsgi:app"]