Personal music catalogue application with external API integration and a React.js UI
2.2K
The MusicCatalogue GitHub project implements the entities, business logic, a REST service and a UI for a SQL-based personal music collection catalogue, providing facilities for recording and querying the following data:
The musiccatalogueui image contains a build of the UI.
In order to run this image you'll need docker installed.
The following "docker run" parameters are recommended when running the musiccatalogueui image:
| Parameter | Value | Purpose |
|---|---|---|
| -d | - | Run as a background process |
| -v | /local/config/ui-config.json:/var/opt/musiccatalogue.ui/config.json | Mount the file containing the UI config |
| -p | 8086:3000 | Expose the container's port 3000 as port 8086 on the host |
| --rm | - | Remove the container automatically when it stops |
For example:
docker run -d -v /local/config/ui-config.json:/var/opt/musiccatalogue.ui/config.json -p 8086:3000 --rm davewalker5/musiccatalogueui:latest
The local path given to the -v argument is described, below, and should be replaced with a value appropriate for the host running the container.
Similarly, the port number "8086" can be replaced with any available port on the host.
The description of the container parameters, above, specifies that a file containing the UI configuration file is mounted, using the "-v" parameter.
The file should contain a single key, holding the base URL for the associated web service:
{
"api": {
"baseUrl": "http://localhost:8098"
}
}
The UI is a React application that runs in the local browser, so the URL must be accessible from the host.
As the UI needs to be run in concert with the web service, it's recommended to run it using Docker Compose. The following is an example compose file:
services:
music-ui:
container_name: musiccatalogueui
image: davewalker5/musiccatalogueui:latest
restart: always
ports:
- "8086:3000"
volumes:
- /local/config/ui-config.json:/opt/musiccatalogue.ui/config.json
music-api:
container_name: musiccatalogueservice
image: davewalker5/musiccatalogueapisqlite:latest
restart: always
ports:
- "8098:80"
volumes:
- /local/data:/var/opt/musiccatalogue.api/
The local path to the config file and the local data path and port for the service should be set per the instructions, above, and the instructions for the musiccatalogueapisqlite image.
The port for the UI, 8086, should be set to an available local port.
For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.
Content type
Image
Digest
sha256:e26997e6c…
Size
418.3 MB
Last updated
about 1 month ago
docker pull davewalker5/musiccatalogueui