-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
43 lines (36 loc) · 1.49 KB
/
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
39
40
41
42
43
FROM python:3.9
LABEL maintainer="[email protected]"
# the exposed port must match the deployment.yaml containerPort value
EXPOSE 80
ENTRYPOINT [ "/usr/local/bin/gunicorn", "tom_demo_base.wsgi", "-b", "0.0.0.0:80", "--access-logfile", "-", "--error-logfile", "-", "-k", "gevent", "--timeout", "300", "--workers", "2"]
WORKDIR /tom-demo
COPY . /tom-demo
RUN pip install --upgrade pip && pip install poetry
RUN poetry config virtualenvs.create false --local
RUN poetry install --no-interaction
# Temporarily remove nodejs/npm from the base image until tom_nonlocalized events is installed
# # continue to setup the image with node and npm install (via nvm)
# # see https://stackoverflow.com/questions/25899912/
#
# # Use bash for subsequent RUN, CMD, ENTRYPOINT commands
# SHELL ["/bin/bash", "--login", "-c"]
#
# ENV NVM_DIR /usr/local/nvm
# RUN mkdir -p $NVM_DIR
# ENV NODE_VERSION 14.17.0
#
# # Install nvm with node and npm
# RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash \
# && source $NVM_DIR/nvm.sh \
# && nvm install $NODE_VERSION \
# && nvm alias default $NODE_VERSION \
# && nvm use default
#
# ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
# ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# write new webpack-stats.json for django-webpack-loader to use
# and install the Vue JS/CSS etc as static files
# WORKDIR /tom-demo/vue
# RUN npm install && npm run build
WORKDIR /tom-demo
RUN python manage.py collectstatic --noinput