-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (26 loc) · 855 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
FROM continuumio/miniconda3
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install curl -y
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
RUN mkdir -p /backend
RUN mkdir -p /frontend
RUN mkdir -p /scripts
RUN mkdir -p /static-files
RUN mkdir -p /media-files
COPY ./scripts /scripts
COPY ./backend/requirements.yml /backend/requirements.yml
RUN chmod +x ./scripts
RUN /opt/conda/bin/conda env create -f /backend/requirements.yml
ENV PATH /opt/conda/envs/climate-cockpit/bin:$PATH
ENV PYTHONDONTWRITEBYTECODE=1
RUN echo "source activate climate-cockpit">~/.bashrc
WORKDIR /frontend
COPY ./frontend/package.json /frontend/
COPY ./frontend/package-lock.json /frontend/
RUN npm install
COPY ./frontend /frontend
RUN npm run build
COPY ./backend /backend
WORKDIR /backend