Docker
Deploy ParsonLabs Music to a Docker Container
In order to tell the container where your media is located, we can simply edit both the /path/to/config
and /path/to/music
in the container.
Values to Edit
/path/to/config
- This is the path where all of the ParsonLabs Music data will be stored/path/to/music
- This is the path to your music folder
Docker Run
That's all! Once the container starts, you will see running on port 1993
.
Docker Compose
In the root of the repository, you will see two files, docker-compose.yml
and docker-compose-local.yml
, these are used to deploy Music.
docker-compose.yml
docker-compose-local.yml
Dockerfile
located in the root of the projectEditing docker-compose.yml
Locally Building the Image
Starting music in docker-compose
To start music, when the volumes and environment variables have been set, run the command:
If you would like to use the docker-compose-local.yml
file, run this command which specifies the docker-compose-local.yml
file.
This will start ParsonLabs Music in a daemon
Info
Running the containers as a daemon or detached means that the containers will run in the background and means you can safely exit the console.
Deploying with Podman
To deploy ParsonLabs Music using Podman, you can follow similar steps to Docker. Here’s how you can do it:
Podman Run
Podman Compose
If you prefer to use a compose file, you can use podman-compose
with the same or files. Here’s how you can do it:
Using
Using
Info
Running the containers as a daemon or detached means that the containers will run in the background, allowing you to safely exit the console.
Changing Ports
What Ports do What?
1993:1993
- This port handles the server and website of ParsonLabs Music.
Changing Port Mappings
If you need to change the port mappings, you can do so by changing the docker running scripts. For example, to change the external port from 1993
to 9000
, you would update the port mapping as follows:
Environment variables
JWT Secret
The JWT Secret is used in authentication to sign and verify the JWT's that are recieved in the server are legitimate. Although Music randomly generates a JWT Secret everytime the server is restarted, it is possible to assign a custom secret through the environment variable JWT_SECRET=
.
For example, for Docker run
through adding the -e JWT_SECRET="your_super_secure_secret"
:
Similarly for docker-compose
: