Please install the following dependencies to run audino
on your system:
- git [tested on v2.23.0]
- docker [tested on v19.03.8, build afacb8b]
- docker-compose [tested on v1.25.5, build 8a1c60f6]
$ git clone https://github.com/midas-research/audino.git
$ cd audino
Note for Windows users: Please configure git to handle line endings correctly as services might throw an error and not come up. You can do this by cloning the project this way:
$ git clone https://github.com/midas-research/audino.git --config core.autocrlf=input
There is a default production configuration which can be directly used for building and running the tool. This configuration can be modified based on your requirement as follows:
backend
service:
Environment Variables:
ADMIN_USERNAME
: Username for admin user (defaults toadmin
)ADMIN_PASSWORD
: Password for admin user (defaults topassword
)DATABASE_URL
: SQLAlchemy Database URL (currently only MySQL database is supported)JWT_SECRET_KEY
: JSON Web Token Secret keyJWT_REDIS_STORE_URL
: JSON Web Token Redis Store URL
Volumes:
Audio datapoints uploaded are stored in /root/uploads
folder inside docker container and mounted to backend_data
volume. You can change this and mount host server volume instead.
mysql
service:
Environment Variables:
MYSQL_DATABASE
: MySQL Database name. Defaults toaudino
. If changed, you need to change database name in../mysql/create_database.sql
.MYSQL_ROOT_PASSWORD
: Password forroot
user. Defaults toroot
.MYSQL_USER
: Application user to be created forMYSQL_DATABASE
. Note:DATABASE_URL
inbackend
service should reflect this changeMYSQL_PASSWORD
: Application user's password. Note:DATABASE_URL
inbackend
service should reflect this change
Volumes:
MySQL data is stored in /var/lib/mysql
folder inside docker container and mounted to mysql_prod_data
volume. You can change this and mount host server volume instead.
redis
service:
Environment Variables:
REDIS_PASSWORD
: Password for redis store. Defaults toaudino
. Note:JWT_REDIS_STORE_URL
inbackend
service should reflect this change
Volumes:
Redis data is stored in /data
folder inside docker container and mounted to redis_data
volume. You can change this and mount host server volume instead.
To build the services, run:
$ docker-compose -f docker-compose.prod.yml build
To bring up the services, run:
$ docker-compose -f docker-compose.prod.yml up
Then, in browser, go to http://0.0.0.0/ to view the application.
To bring down the services, run:
$ docker-compose -f docker-compose.prod.yml down
Similar to production
setup, you need to use development configuration for working on the project, fixing bugs and making contributions.
To build the services, run:
$ docker-compose -f docker-compose.dev.yml build
To bring up the services, run:
$ docker-compose -f docker-compose.dev.yml up
Then, in browser, go to http://localhost:3000/ to view the application. API is served on http://localhost:5000/
To bring down the services, run:
$ docker-compose -f docker-compose.dev.yml down
To understand the structure of the database, the current entity-relationship diagram is shared here. Please update the diagram using draw.io importable file if any change or pull request modifies it.