Skip to content

Commit

Permalink
Update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-pimenta-DME committed Oct 15, 2023
1 parent b86284c commit df2ec57
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ vagrant ssh
3. Clone the repo

```sh
git clone https://github.com/EOEPCA/um-identity-apigit
git clone https://github.com/EOEPCA/um-identity-api
```

4. Change local directory
Expand All @@ -108,7 +108,7 @@ cd um-identity-api

5.1 Run locally with Python
```sh
pip install -r requirements.local.txt
pip install -r requirements.txt
python -m "flask" run --host=0.0.0.0 --port=5566
```
5.2 Run locally with Docker
Expand Down Expand Up @@ -182,4 +182,4 @@ Project Link: [https://github.com/EOEPCA/um-identity-api](https://github.com/EOE
[issues-url]: https://github.com/EOEPCA/um-identity-api/issues
[license-shield]: https://img.shields.io/github/license/EOEPCA/um-identity-apisvg?style=flat-square
[license-url]: https://github.com/EOEPCA/um-identity-api/blob/master/LICENSE
[build-shield]: https://www.travis-ci.com/EOEPCA/um-identity-apisvg?branch=master
[build-shield]: https://www.travis-ci.com/EOEPCA/um-identity-apisvg?branch=master
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Flask==3.0.0
WellKnownHandler==0.2.0
requests==2.25.1
requests==2.31.0
flask-swagger-ui==4.11.1
python-keycloak==3.2.0
mock==5.0.2
pyyaml==5.3.1
python-keycloak==3.3.0
mock==5.1.0
pyyaml==6.0.1
elasticsearch==8.8.0
lxml==4.9.3
configparser==5.3.0
configparser==6.0.0
waitress==2.1.2
python-dotenv==1.0.0
retry==0.9.2
flask-healthz==0.0.3
flask-healthz==1.0.0
identityutils @ git+https://github.com/eoepca/um-identity-service@master
13 changes: 1 addition & 12 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,7 @@
logger.Logger.get_instance().load_configuration(os.path.join(os.path.dirname(__file__), "../conf/logging.yaml"))
logger = logging.getLogger("IDENTITY_API")

mode = os.environ.get('FLASK_ENV')
logger.info("Starting app in mode: " + str(mode))
if mode == 'develop':
config_file = "config.develop.ini"
elif mode == 'demo':
config_file = "config.demo.ini"
elif mode == 'production':
config_file = "config.production.ini"
else:
config_file = "config.ini"
config_path = os.path.join(os.path.dirname(__file__), "../conf/", config_file)
config_path = os.path.join(os.path.dirname(__file__), "../conf/config.ini")

app = Flask(__name__)
app.secret_key = ''.join(choice(ascii_lowercase) for _ in range(30)) # Random key
Expand All @@ -60,7 +50,6 @@ def register_endpoints(config, keycloak):


def keycloak_client(config):
logger.info("config: " + str(config))
auth_server_url = config.get("Keycloak", "auth_server_url")
realm = config.get("Keycloak", "realm")
logger.info("Starting Keycloak client for: " + str(auth_server_url) + " realm: " + str(realm))
Expand Down

0 comments on commit df2ec57

Please sign in to comment.