- Vue for web gui
- Spring Boot for server API
- Docker Stack for deployment
On production mode, all web content (vue js) will be served from spring. But locally, we can run backend and frontend as two saperate services on port 8080(FE) and port 8089(BE).
- git clone project
- Edit
converter/src/main/resources/application.propertiesand update active profile todev - Run application.
cd converter-guinpm run serve- env vars will be served from
.env.development, instead of.env.production.
- git clone project
- copy application.yml to application-dev.yml
- Update Google and Spotify api keys and secrets
mvn clean installmvn --projects converter spring-boot:run
Prerequsite for running this project:
-
Docker Swarm
To run this project, you need to have Docker installed and use Docker in Swarm Mode. You can find more information how to run a single node Docker Swarm here.
-
YouTube Data API authorization credentials
You will need a YouTube Data API OAuth crendentials for run this project as it uses YouTube Data API. Remember to whitelist
http://localhost:${API_PORT}/api/v1/youtubeon your Google API Console. https://i.imgur.com/TPK7XKz.png -
Spotify API authorization credentials
Same as above, you will need a Spotify Data API OAuth crendentials for run this project as it uses Spotify API. Remember to whitelist
http://localhost:${API_PORT}/api/v1/spotifyon your Google API Console.
To run the application, download the compose file and change the following entries to your own:
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- SPOTIFY_CLIENT_ID
- SPOTIFY_CLIENT_SECRET
After chaning the credentials, run:
docker stack deploy -c converter-service.yml cs
This application will take up port 8081 (web gui) and 8080 (server).
If you want to use a different port for either webgui or api server, go into the docker compose file and change the forwarding port for apiservice and/or webgui
Then visit localhost:8081 or the port you specified.
You can read more about the project here.
If you want to play with application without running it, you can visit https://zeehon.us/converter.
cd ./converter
docker build -t localhost:5000/converter-api .
docker push localhost:5000/converter-api
cd ../converter-gui
docker build -t localhost:5000/converter-gui .
docker push localhost:5000/converter-gui
cd ../docker
docker stack deploy -c converter-service.yml converter