This project is a web service that performs the following functions:
- Create a user with the given: name, unique user ID and UUID access token (as a string) for the given user;
- For each user - saving the audio recording in wav format, converting it to mp3 format and writing to the database and providing a link to download the audio recording.
Instructions for building a docker image with a service, setting it up and running it.
- This option also starts the database and the pgadmin4 administration tool.
- The start settings for running containers are located in the docker-compose.yml file
- The Dockerfile contains instructions for building the audio_base_service service image.
- Run with docker-compose: docker compose up -d
- Stop and remove Docker-compose containers: docker compose down
- View information about running Docker-compose processes: docker compose ps
- View logs in Docker-compose: docker compose logs
Starting the service in Docker:
- Building the application image: docker build -t audio_base_service .
- Create a container and run it: docker run -d --name mycontainer -p 8080:8080 -e DB_URI=postgresql://audio_user:cfytr666131@localhost/audio_base_servicedb audio_base_service
Starting a service without a container: uvicorn app.main:app --host "0.0.0.0" --port "8080"
You can check the performance of the service by going to the file: testapi.py