-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (22 loc) · 862 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
FROM alpine:3.7
# PIP_NO_CACHE_DIR=false actually means *no cache*
ENV APP_ROOT=/app \
DJANGO_SETTINGS_MODULE=bitket.settings \
PIP_NO_CACHE_DIR=false \
PIPENV_DONT_LOAD_ENV=true \
PYTHONUNBUFFERED=true
RUN mkdir ${APP_ROOT}
WORKDIR ${APP_ROOT}
COPY apk-packages.txt ${APP_ROOT}/
RUN apk add --no-cache $(grep -vE "^\s*#" ${APP_ROOT}/apk-packages.txt | tr "\r\n" " ") && \
pip3 install -U "pipenv!=9.0.0"
COPY Pipfile Pipfile.lock ${APP_ROOT}/
RUN pipenv install --system --deploy
COPY package.json yarn.lock ${APP_ROOT}/
RUN yarn install && yarn cache clean
COPY . ${APP_ROOT}/
RUN pip3 install -e ${APP_ROOT} && \
yarn build && \
BITKET_DATABASE_URL=sqlite://// BITKET_EMAIL_URL=consolemail:// BITKET_REDIS_URL=redis:// BITKET_SECRET_KEY=build django-admin collectstatic --no-input
EXPOSE 80
CMD ["bitket-interface-server"]