2mixxx is a web application for requesting songs that DJs have in their iTunes libraries.
- Install git
- Install docker compose
- Create an auth0 account.
- Create a Single-Page Application API in your auth0 account.
- Create a Machine to Machine API in your auth0.
- Clone the project
$ git clone https://github.com/carlesfelix/2mixxx.git
- Create the environment variables for frontend.
/frontend/.env
REACT_APP_SOCKET_BASE_URI=wss://{your_host}:3002
REACT_APP_AUTH0_DOMAIN={your_auth0_domain}
REACT_APP_AUTH0_CLIENT_ID={your_auth0_SPA_client_id}
REACT_APP_API_BASE_URL=https://{your_host}:3001/api
GENERATE_SOURCEMAP=false
- Create the environment variables for backend.
/backend/.env
NODE_ENV=production
API_PORT=3001
MYSQL_ROOT_PASSWORD={your_mysql_root_password}
MYSQL_DATABASE={your_mysql_database}
MYSQL_USER={your_mysql_user}
MYSQL_PASSWORD={your_mysql_password}
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_SSL=0 # To be upgraded to 1 in the future
SOCKET_PORT=3002
WEB_ORIGIN=https://{your_host}
JWT_ROOM_USERS_SECRET={your_secret}
AUTH0_DOMAIN={your_auth0_domain}
AUTH0_MACHINE_TO_MACHINE_CLIENT_ID={your_machine_to_machine_client_id}
AUTH0_MACHINE_TO_MACHINE_CLIENT_SECRET={your_machine_to_machine_client_secret}
AUTH0_DB_CONNECTION={name_of_the_auth0_database_connection_that_stores_your_users}
- Place your ssl files 2mixxx.crt and 2mixxx.key in the project root directory.
- Launch 2mixxx with docker compose.
$ docker-compose -f docker-compose.deploy-vps.yml build
$ docker-compose -f docker-compose.deploy-vps.yml up -d
- Create the first registered user in your auth0 dashboard.
- Create the first registered user (as admin) in the database in order to have full access to the dashboard.
INSERT INTO registered_users (id, createdAt, updatedAt, sub, email, userRole) VALUES('70b77906-ec13-4b79-8a55-f8d33429dfce', now(), now(), 'auth0|auth0_user_id', 'your@email.com', 1);
Follow the instruccions located in Frontend (client side) and Backend (server side).