-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 804 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
# syntax=docker/dockerfile:1
FROM python:3.9-slim
# Get environment variables from build args
ARG RUN_LOCAL_ARG
ENV RUN_LOCAL $RUN_LOCAL_ARG
ARG PROJECT_ID_ARG
ENV PROJECT_ID $PROJECT_ID_ARG
ARG GOOGLE_APPLICATION_CREDENTIALS_ARG
ENV GOOGLE_APPLICATION_CREDENTIALS $GOOGLE_APPLICATION_CREDENTIALS_ARG
# Set PORT number for server to listen on
ENV PORT=8080
# Set working directory
WORKDIR /app
# Copy files
COPY . .
# Install NPM for React frontend
RUN apt-get update && apt-get install -y curl
RUN curl -s https://deb.nodesource.com/setup_16.x | bash
RUN apt-get -y install nodejs
#RUN npm install --prefix frontend
# Install requirements
#TODO - add venv
RUN pip install --upgrade pip && \
pip install -r requirements.txt
ENV DEBUG=1
# Run build script
CMD ["/bin/bash","-c","./build.sh"]