Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/interface_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [16.x, 18.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -33,4 +33,4 @@ jobs:
run: npm test -- --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Lint Code Base
uses: docker://github/super-linter:v3
uses: github/super-linter@v4
env:
PYTHON_PYLINT_CONFIG_FILE: .pylintrc
VALIDATE_ALL_CODEBASE: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/py_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7

Expand All @@ -40,8 +40,8 @@ jobs:
- name: Set-up the project
run: |
docker-compose up -d postgres
docker-compose run --rm bety initialize
docker-compose up -d
docker-compose up -d bety
docker-compose up -d
docker ps -a
docker logs betydb-yaba_yaba_api_1

Expand All @@ -51,4 +51,4 @@ jobs:
pytest --cov= ${{ matrix.path }} --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
17 changes: 14 additions & 3 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
FROM python:3.7.2-slim

RUN apt-get update && apt-get install -y \
git \
sudo \
libpq-dev \
python-dev

RUN adduser --disabled-password --gecos '' myuser && \
chown -R myuser:myuser /usr/local/lib/python3.7/site-packages && \
echo "myuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
Copy link
Member

@dlebauer dlebauer May 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is giving myuser sudo permissions without a password a potential security vulnerability?

What is the goal here?


COPY . /code

WORKDIR /code

RUN apt-get update && apt-get install -y \
git

RUN pip install git+https://github.com/aleju/imgaug --no-deps &&\
pip install GDAL\
export PATH=/usr/bin/gdal-config:$PATH\
pip install Fiona\
pip install -r requirements.txt

USER myuser

CMD ["python","server.py"]
2 changes: 1 addition & 1 deletion app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jsonschema==3.2.0
Flask==1.0
Werkzeug==0.15.3
SQLAlchemy==1.3.0
geopandas==0.5.0
geopandas==0.6.1
PyYAML==5.4
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
- 6001:6000
depends_on:
- yaba_api

yaba_visualization:
build: ./visualization
networks:
Expand All @@ -60,16 +60,16 @@ services:
environment:
- HOST=0.0.0.0
- PORT=8075

ports:
- 8008:8075
depends_on:
- postgres
restart: unless-stopped

yaba_interface:
build: ./interface
networks:
networks:
- bety
volumes:
- './interface:/code'
Expand All @@ -88,5 +88,6 @@ services:
volumes:
postgres:


networks:
bety:
bety: