This server was generated by the swagger-codegen project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub. This is an example of building a swagger-enabled Flask server.
This example uses the Connexion library on top of Flask. **May have to import this library separately with this command
pip install connexion[swagger-ui] --user
Python 3.5.2+
To run the server, please execute the following from the root directory. Make sure to specify --user if you do not have access:
pip3 install -r requirements.txt --user
python3 -m swagger_server
and open your browser to here:
http://18.217.73.244:8080/mscs721/concordance/1.0.0/ui/
Your Swagger definition lives here:
http://18.217.73.244:8080/mscs721/concordance/1.0.0/swagger.json
To run for production mode, use uWSGI:
pip3 install -r requirements.txt --user
uwsgi --http :8080 --wsgi-file swagger_server/__main__.py --callable application
OR (using uwsgi.ini config file)
pip3 install -r requirements.txt --user
uwsgi uwsgi.ini
To run the server on a Docker container, please execute the following from the root directory:
# building the image
docker build -t mscs621-concordance .
# starting up a container
docker run -p 8080:8080 -e AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> -e AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> -e AWS_DEFAULT_REGION=us-east-2 mscs621-concordance
Contains a docker-compose file, orechstrating a ReactJS frontend container and Python uWSGI backend container. It is served off of http://localhost. Note** missing .env files in both frontend and backup folders.
To build and run both of the Docker containers, please execute the following from the root directory:
# create the images and run both containers (--build force builds a new image)
docker-compose up --build