-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
30 lines (22 loc) · 840 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
FROM nikolaik/python-nodejs:python3.8-nodejs14 as base
WORKDIR /var/www
COPY . .
# Install Python Dependencies
RUN ["pip", "install", "-r", "requirements.txt"]
# # Build our React App
# RUN ["npm", "install", "--prefix", "frontend"]
# ENV REACT_APP_BASE_URL=https://flask-react-aa.herokuapp.com
# RUN ["npm", "run", "build", "--prefix", "frontend"]
# # Move our react build for Flask to serve
# # Use cp here because we're copying files inside our working directory, not from
# # our host machine.
# RUN ["cp", "-r", "frontend/build/", "backend/static"]
RUN ["cp", "-r", "backend/static"]
# Setup Flask environment
ENV FLASK_APP=backend
ENV FLASK_ENV=production
ENV SQLALCHEMY_ECHO=True
ENV SECRET_KEY=lkasjdf09ajsdkfljalsiorj12n3490re9485309irefvn,u90818734902139489230
EXPOSE 8000
# Run flask environment
CMD gunicorn backend:app