-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (34 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
41 lines (34 loc) · 1.07 KB
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
# syntax=docker/dockerfile:1.4
FROM node:16-alpine as frontend
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
RUN npm install
COPY ./src ./src
COPY ./public ./public
RUN yarn build
FROM continuumio/anaconda3:latest as backend
WORKDIR /home/amis
ADD backend/application.py backend/config.py backend/boot.sh backend/requirements.txt ./
RUN conda create -n amis -y python=3.7
RUN echo "conda activate amis" > ~/.bashrc
ENV PATH /opt/conda/envs/amis/bin:$PATH
ENV SECRET_KEY $SECRET_KEY
ENV SQLALCHEMY_DATABASE_URI $SQLALCHEMY_DATABASE_URI
ENV UPLOAD_FOLDER $UPLOAD_FOLDER
ENV IMAGE_LOAD_FOLDER $IMAGE_LOAD_FOLDER
ENV IMG_UPLOAD_FOLDER_URL $IMG_UPLOAD_FOLDER_URL
ENV JPEG_FOLDER $JPEG_FOLDER
ENV JPG_FOLDER $JPG_FOLDER
RUN apt-get update
RUN apt-get install -y gcc
RUN apt-get install -y libpq-dev
RUN apt-get install -y python-dev-is-python3
RUN apt-get install -y vim
RUN pip install -r ./requirements.txt
RUN apt-get install ffmpeg libsm6 libxext6 -y
COPY --from=frontend /app/build ../build
ADD backend ./
RUN chmod 777 boot.sh
EXPOSE 5000
ENTRYPOINT ["./boot.sh"]