dependabot[bot] 9cf4409b16
Update faker requirement from ~=13.6.0 to ~=13.7.0 in /api
Updates the requirements on [faker](https://github.com/joke2k/faker) to permit the latest version.
- [Release notes](https://github.com/joke2k/faker/releases)
- [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/joke2k/faker/compare/v13.6.0...v13.7.0)

---
updated-dependencies:
- dependency-name: faker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 09:31:32 +00:00
..
2022-04-12 09:50:24 +02:00
2022-04-05 15:08:57 +02:00
2022-04-12 09:50:24 +02:00
2022-04-05 19:08:09 +02:00
2022-04-12 12:16:25 +02:00
2022-04-12 09:50:24 +02:00
2022-03-30 10:51:38 +02:00

API

Aktienbot API

Development

  1. Create virtual environment python -m venv venv env/Scripts/activate
  2. Install requirements pip install -r api/requirements.txt
  3. Set environment variables (see list below)
    1. Use .env-file in api directory like .env.example
    2. Or set variables using export or set commands. (Windows set, Linux export)
  4. Run api python api/app.py

Testing

  1. Create virtual environment python -m venv venv env/Scripts/activate
  2. Install requirements pip install -r api/requirements.txt
  3. Set environment variables (see list below)
    1. Use .env-file in api directory like .env.example
    2. Or set variables using export or set commands. (Windows set, Linux export)
  4. Change directory: cd api/
  5. Run tests: python -m pytest -v --cov-report term-missing --cov=app

Environment variables

    # Flask secret key
    SECRET_KEY=
    
    # MYSQL Connection
    MYSQL_USER=
    MYSQL_PASSWORD=
    MYSQL_HOST=
    MYSQL_PORT=
    MYSQL_DATABASE=

Docker

docker run -d \
    --name aktienbot_api \
    --hostname aktienbot_api \
    --publish 80:80 \
    --env "SECRET_KEY=" \
    --env "MYSQL_USER=" \
    --env "MYSQL_PASSWORD=" \
    --env "MYSQL_HOST=" \
    --env "MYSQL_PORT=" \
    --env "MYSQL_DATABASE=" \
    --restart unless-stopped \
    registry.flokaiser.com/aktienbot/api:latest

or load environment variables from file by using --env-file <filename>