api: Include scripts repo, and add python to docker container
This commit is contained in:
parent
39f5a011ed
commit
764a711a9e
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "api/scripts"]
|
||||
path = api/scripts
|
||||
url = https://github.com/openbikesensor/OpenBikeSensor-Scripts
|
|
@ -1,9 +1,18 @@
|
|||
FROM node:14
|
||||
FROM node:15.11.0-buster
|
||||
|
||||
# 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
|
||||
|
||||
WORKDIR /opt/obs/api
|
||||
|
||||
ADD package.json package-lock.json /opt/obs/api/
|
||||
RUN npm ci
|
||||
|
||||
ADD scripts/setup.py scripts/requirements.txt /opt/obs/api/scripts/
|
||||
RUN cd scripts && pip install -e .
|
||||
|
||||
ADD views /opt/obs/api/views/
|
||||
ADD src /opt/obs/api/src/
|
||||
|
||||
|
|
1
api/scripts
Submodule
1
api/scripts
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1f340a835c327f6410b1954a9824a9d4a5b7d9b0
|
|
@ -16,6 +16,7 @@ services:
|
|||
context: ./api
|
||||
volumes:
|
||||
- ./api/src:/opt/obs/api/src
|
||||
- ./api/scripts:/opt/obs/api/scripts
|
||||
- ./api/views:/opt/obs/api/views
|
||||
- ./local/api-data:/data
|
||||
- ./api/.migrations.js:/opt/obs/api/.migrations.js
|
||||
|
|
Loading…
Reference in a new issue