Skip to content

This project is a web service that creates a user, saves an audio recording in wav format, converts it to mp3 format, writes it to a database, and provides download links for the audio recording.

Notifications You must be signed in to change notification settings

AleksandrGavrilin/audio_base_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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.
  1. Run with docker-compose: docker compose up -d
  2. Stop and remove Docker-compose containers: docker compose down
  3. View information about running Docker-compose processes: docker compose ps
  4. View logs in Docker-compose: docker compose logs

Starting the service in Docker:

  1. Building the application image: docker build -t audio_base_service .
  2. 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

About

This project is a web service that creates a user, saves an audio recording in wav format, converts it to mp3 format, writes it to a database, and provides download links for the audio recording.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published