Commit 7898d25c authored by w2v1's avatar w2v1
Browse files

I guess this should do it

parent 464835bf
Loading
Loading
Loading
Loading

docker-compose.flask.yaml

deleted100644 → 0
+0 −33
Original line number Diff line number Diff line
version: '3.7'

services:
  flask:
    build:
      context: src/
      dockerfile: api/flask/web/Dockerfile
    ports:
      - '8765:9090'
    #TODO change me
    command: [ "sh", "/tmp/scripts/run_dev.sh" ]
    # command: ["tail", "-f", "/dev/null"]
    environment:
      - FLASK_DEBUG=1
      - CHOKIDAR_USEPOLLING=true
      - FAST_REFRESH=false
      - DATABASE_DB=postgres
      - DATABASE_USER=postgres
      - DATABASE_PW=postgres
      - DATABASE_HOST=db
      - DATABASE_PORT=5432
      - PG_DATABASE=postgres
      - PG_USER=postgres
      - PG_PASSWORD=postgres
      - PG_HOST=postgres
      - PG_PORT=5432
    healthcheck:
      test: [ "CMD", "curl", "--fail", "-G", "http://localhost:9090/api/healthcheck" ]
      interval: 30s
      timeout: 10s
      retries: 30
    volumes:
      - ./src/api/flask/web/:/tmp/api
 No newline at end of file

src/api/flask/__init__.py

deleted100644 → 0
+0 −12
Original line number Diff line number Diff line
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Provide mixins for multiple abstract classes."""

try:
    import redis
except ImportError:
    raise ImportError('You need to pip install redis.')
try:
    import flask
except ImportError:
    raise ImportError('You need to pip install flask.')
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ api = Namespace('api', 'Loads Hello World' )
@api.doc()
class GetBaseRoute(Resource):
    def get(self):
        return api_routes.hello_world()
        return api_routes.home()

# TODO
# Make swagger from flask-restx
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ pytest==7.2.2
coverage==7.2.2
flask-restx==1.1.0
path==16.6.0
redis==5.0.6
#
# if auth:
# onelogin==2.0.3
+5 −0
Original line number Diff line number Diff line
#!/bin/bash

cd /tmp/tests/
pytest -s .
# docker compose down test_db
 No newline at end of file
Loading