-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
47 lines (31 loc) · 989 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
39
40
41
42
43
44
45
46
47
FROM python:3.10
WORKDIR /app
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get update && apt-get install -y \
graphviz \
nodejs
RUN npm install -g npm
# This is not a nice way to install npm packages, but it is the
# closest it gets similar to venv-way of installing project-specific
# packages.
RUN mkdir -p /nodeapp
WORKDIR /nodeapp
COPY package.json package.json
COPY package-lock.json package-lock.json
RUN npm install
WORKDIR /app
COPY pyproject.toml pyproject.toml
COPY poetry.lock poetry.lock
ENV POETRY_VIRTUALENVS_CREATE false
RUN pip install --upgrade pip \
&& pip install poetry \
&& poetry install
EXPOSE 8000
COPY entrypoint.sh entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
# Force stdin, stdout and stderr to be totally unbuffered.
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY . /app
# Set the default command to be executed.
CMD gunicorn forenings_medlemmer.wsgi:application --bind 0.0.0.0:$PORT