-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (22 loc) · 746 Bytes
/
Dockerfile
File metadata and controls
27 lines (22 loc) · 746 Bytes
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
FROM node:alpine
MAINTAINER Stanley Ndagi "ndagis@gmail.com"
RUN apk update && apk upgrade
WORKDIR /app
# Install python, pip and python packages
RUN apk add python3 curl
COPY requirements.txt requirements.txt
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 \
&& rm -rf /var/cache/apk/* \
&& pip3 install --upgrade pip \
&& pip3 install -r requirements.txt
# Run the following commands for deployment
COPY package.json package.json
RUN npm set progress=false && npm install -s --no-progress
COPY . .
RUN npm run build
RUN python3 format_index_html.py
RUN python3 manage.py collectstatic --noinput
# EXPOSE port to be used
EXPOSE 8000
# Set command to run as soon as container is up
CMD python3 manage.py runserver 0.0.0.0:8000