2021-04-29 19:43:40 +00:00
|
|
|
FROM node:15.14-buster
|
2021-03-24 15:49:41 +00:00
|
|
|
|
|
|
|
# Install python3, pip3, and make them the default for `python` and `pip` commands
|
|
|
|
RUN apt-get update && apt-get install -y python3 python3-pip
|
|
|
|
RUN ln -s $(which python3) /usr/local/bin/python
|
|
|
|
RUN ln -s $(which pip3) /usr/local/bin/pip
|
2020-11-17 16:30:13 +00:00
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
WORKDIR /opt/obs/api
|
2021-03-24 15:49:41 +00:00
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
ADD package.json package-lock.json /opt/obs/api/
|
2021-05-14 07:19:45 +00:00
|
|
|
RUN echo update-notifier=false >> ~/.npmrc
|
2020-11-17 16:30:13 +00:00
|
|
|
RUN npm ci
|
|
|
|
|
2021-04-19 19:38:51 +00:00
|
|
|
ADD scripts /opt/obs/api/scripts/
|
2021-03-24 15:49:41 +00:00
|
|
|
RUN cd scripts && pip install -e .
|
|
|
|
|
2021-02-23 19:20:16 +00:00
|
|
|
ADD views /opt/obs/api/views/
|
2021-02-17 21:19:42 +00:00
|
|
|
ADD src /opt/obs/api/src/
|
2020-11-17 16:30:13 +00:00
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
EXPOSE 3000
|
|
|
|
ENV PORT=3000
|
2020-11-17 16:30:13 +00:00
|
|
|
CMD ["npm", "start"]
|