-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
49 lines (32 loc) · 983 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
48
49
FROM node:18-alpine AS node_builder
ENV http_proxy=http://proxy.shom.fr:3128
ENV https_proxy=http://proxy.shom.fr:3128
WORKDIR /app
COPY package.json /app
COPY package-lock.json /app
RUN npm ci
COPY ./static /app/static
COPY ./templates /app/templates
COPY ./tailwind.config.js /app
COPY ./.postcssrc /app
#COPY . /app
RUN npm run build
FROM python:3.10-slim-bullseye
ENV http_proxy=http://proxy.shom.fr:3128
ENV https_proxy=http://proxy.shom.fr:3128
RUN apt-get -y update
# Install depedences for psycopg2
RUN apt-get -y install libpq-dev gcc
# Install depedences for gdal
RUN apt-get -y install binutils libproj-dev gdal-bin
WORKDIR /app
COPY requirements.txt /app
RUN pip install -r requirements.txt
RUN pip install gunicorn
COPY . /app
RUN mkdir -p /app/static/compiled
COPY --from=node_builder /app/static/compiled /app/static/compiled
RUN chown -R 1000:1000 "/app"
EXPOSE 8000
USER 1000:1000
ENTRYPOINT ["gunicorn", "--bind", ":8000", "core.wsgi:application"]