Installations
I try to keep everything as simple as possible, preferably with Docker and Docker Compose. I tried installing PeerTube via Docker, but it was hell trying to get it to work. In the end, I got tired of troubleshooting and tried installing it directly in the system instead. It worked right away!
When I install something via Docker, I use YAML files. This has its advantages. The main one is that it's easy to back up the configurations. Sure, you can put docker run commands in .sh files, but nah.
The steps below explain how I install a new service via Docker Compose and how I make it easily accessible via the internet.
Step 1
The first step is to create the YAML file. Copy the lines for Docker Compose for the service you want to install and paste them into the YAML file.
Step 2
Now comes the fun part: configuration. Open the YAML file with nano and go through each line. Is container_name: missing? Add it under image:. Doing this makes it easier to read what everything is when you run docker ps.
If the .env file exists, open it as well and change what needs to be changed.
Save any changes.
Step 3
Go to the company where you have your domain and create a subdomain. We can call it pork.chop.yummy.
Step 4
Now comes the exciting part: installing and starting the service. Run docker compose -f directory/file.yml up -d to install the service. Wait until it is finished.
Step 5
Once the subdomain has been created, go to /etc/apache2/sites-available and clone one of the .conf files located there. Name it pork.chop.yummy and open it. Change the information to the correct details and then save the file.
Step 6
Now run sudo a2ensite pork.chop.yummy to activate the subdomain on the server, followed by sudo systemctl reload apache2 and sudo certbot --apache. Go through the list that appears and select the new subdomain. Wait until the process is complete, then run sudo systemctl reload apache2.