diff --git a/.github/workflows/interface_test.yml b/.github/workflows/interface_test.yml index 8d40246..96aed97 100644 --- a/.github/workflows/interface_test.yml +++ b/.github/workflows/interface_test.yml @@ -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 }} @@ -33,4 +33,4 @@ jobs: run: npm test -- --coverage - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 \ No newline at end of file + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 634d4b8..8b95419 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -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 diff --git a/.github/workflows/py_tests.yml b/.github/workflows/py_tests.yml index 1dad83b..94c280f 100644 --- a/.github/workflows/py_tests.yml +++ b/.github/workflows/py_tests.yml @@ -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 @@ -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 @@ -51,4 +51,4 @@ jobs: pytest --cov= ${{ matrix.path }} --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 \ No newline at end of file + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/app/Dockerfile b/app/Dockerfile index c8e6cce..299a75e 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -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 . /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"] diff --git a/app/requirements.txt b/app/requirements.txt index d0fca1c..528e7ab 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 713cefd..b94c6a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,7 +49,7 @@ services: - 6001:6000 depends_on: - yaba_api - + yaba_visualization: build: ./visualization networks: @@ -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' @@ -88,5 +88,6 @@ services: volumes: postgres: + networks: - bety: \ No newline at end of file + bety: