-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·40 lines (35 loc) · 1021 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
38
39
40
# Development docker image
FROM node:10-alpine
LABEL maintainer="[email protected]"
# Python + pip setup
RUN apk add --no-cache --update python3 \
python3-dev \
py3-setuptools \
git \
sudo \
curl \
gcc \
g++ \
make \
sqlite \
bash \
supervisor && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -r /root/.cache
# Environment setup
ARG IP_ADDRESS
ENV API_URL="http://$IP_ADDRESS:8000"
COPY ./server/backend /backend
COPY ./server/frontend /frontend
WORKDIR /frontend
RUN npm install -g @vue/cli
RUN npm install
WORKDIR /backend
RUN pip3 install -r requirements.txt
RUN python3 manage.py migrate
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisor/conf.d/supervisord.conf"]