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-10-10 10:32:28 +00:00
|
|
|
ADD tools /opt/obs/api/tools/
|
|
|
|
ADD requirements.txt /opt/obs/api/
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
RUN pip install -e ./scripts
|
2021-03-24 15:49:41 +00:00
|
|
|
|
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-09-27 16:54:02 +00:00
|
|
|
#ADD .migrations.js .
|
|
|
|
#ADD migrations .
|
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
EXPOSE 3000
|
2021-09-27 16:54:02 +00:00
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
ENV PORT=3000
|
2021-09-27 16:54:02 +00:00
|
|
|
ENV DATA_DIR=/data
|
|
|
|
|
2021-10-10 10:32:28 +00:00
|
|
|
CMD ["npm", "run", "start"]
|