What's new
PGBlitz.com

Register Now! Find useful tips, Interact /w Community Members and join the part the Best Community on the Internet!

Guides HOWTO: Install third-party container with automatic Traefik configuration

Assists Greatly with Development Costs

plex_noob

Senior Member
Staff
Donor
Hi,

This is a small explanation of my "way of doing" for adding "no included" PG containers.
This process requires minimum intervention especially when a reinstall is required or when I need to re-deploy Traefik.
This method uses docker-compose to "execute" docker-compose.yml files.
Once your yml file is configured and tested for a specific container, forget all your worries when re-installing PG.
Keep all your yml files safe and just rerun them when needed.

This procedure is based on the "Shell in A Box" container installation as example.

Steps:
- Install docker-compose:
sudo apt install docker-compose
- create a volume folder for your future container
mkdir -p /opt/appdata/siab
- create an empty docker-compose.yml file
touch /opt/appdata/siab/docker-compose.yml
- copy a docker-compose template content to avoid starting from scratch into the docker-compose.yml file
nano /opt/appdata/docker-compose.yml
- copy + paste the following code
Code:
---
version: '2'
services:
  shellinabox:
    image: sspreitzer/shellinabox:latest
    restart: always
    container_name: siab
    labels:
      traefik.enable: "true"
      traefik.frontend.auth.basic.users: ""
      traefik.frontend.headers.customResponseHeaders: "X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex"
      traefik.frontend.redirect.entryPoint: "https"
      traefik.frontend.rule: "Host:siab.<Your.TLD>,"
      traefik.port: "4200"
    ports:
      - "4200:4200"
    volumes:
      - /:/PG
    environment:
      - "SIAB_ADDUSER=true"
      - "SIAB_USER=siab"
      - "SIAB_USERID=9000"
      - "SIAB_GROUP=guest"
      - "SIAB_GROUPID=9000"
      - "SIAB_PASSWORD=<Your_Password>"
      - "SIAB_SHELL=/bin/bash"
      - "SIAB_HOME=/home/siab"
      - "SIAB_SUDO=true"
      - "SIAB_SSL=false"
networks:
  default:
    external:
      name: plexguide
- Close and save the file
CTRL+X
Y

- Run the following command in the volume folder (opt/appdata/siab)
docker-compose up -d

The container is built, run.
Traefik is configured.
Shell in A Box container is ready to be used.

As simple as that.

Sined
 
Last edited:

Freiner

Junior Member
Hi, I'm trying to use your example to install "fiendica" for quite some time now but I don't get it to work. To be honest, I'm confused about many things and really would appreciate it if someone could help me out a bit.
 

tonycfromit

Respected Member
Staff
Hi,

This is a small explanation of my "way of doing" for adding "no included" PG containers.
This process requires minimum intervention especially when a reinstall is required or when I need to re-deploy Traefik.
This method uses docker-compose to "execute" docker-compose.yml files.
Once your yml file is configured and tested for a specific container, forget all your worries when re-installing PG.
Keep all your yml files safe and just rerun them when needed.

This procedure is based on the "Shell in A Box" container installation as example.

Steps:
- Install docker-compose:
sudo apt install docker-compose
- create a volume folder for your future container
mkdir -p /opt/appdata/siab
- create an empty docker-compose.yml file
touch /opt/appdata/siab/docker-compose.yml
- copy a docker-compose template content to avoid starting from scratch into the docker-compose.yml file
nano /opt/appdata/docker-compose.yml
- copy + paste the following code
---
version: '2'
services:
shellinabox:
image: sspreitzer/shellinabox:latest
restart: always
container_name: siab
labels:
traefik.enable: "true"
traefik.frontend.auth.basic.users: ""
traefik.frontend.headers.customResponseHeaders: "X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex"
traefik.frontend.redirect.entryPoint: "https"
traefik.frontend.rule: "Host:siab.domaine_name.com,"
traefik.port: "4200"
ports:
- "4200:4200"
volumes:
- /:/PG
environment:
- "SIAB_ADDUSER=true"
- "SIAB_USER=siab"
- "SIAB_USERID=9000"
- "SIAB_GROUP=guest"
- "SIAB_GROUPID=9000"
- "SIAB_PASSWORD=YOUR_PASSWORD"
- "SIAB_SHELL=/bin/bash"
- "SIAB_HOME=/home/siab"
- "SIAB_SUDO=true"
- "SIAB_SSL=false"
networks:
default:
external:
name: plexguide


- Close and save the file
CTRL+X
Y

- Run the following command in the volume folder (opt/appdata/siab)
docker-compose up -d

The container is built, run.
Traefik is configured.
Shell in A Box container is ready to be used.

As simple as that.

Sined
Nice!
I was thinking of installing Bliss (organizes your music and fixes tags) and this is something I was going to look into. There may be follow-up questions in the future...
 

bdunn

Junior Member
Oh wow - Bliss is AWESOME! I had never heard of this so I looked it up. Thanks for sharing.

By the way - did you ever get this set up as a PG Container? I'd like to do the same.
 

timekills

Legendary Member
Staff
Donor
Hi,

This is a small explanation of my "way of doing" for adding "no included" PG containers.
This process requires minimum intervention especially when a reinstall is required or when I need to re-deploy Traefik.
This method uses docker-compose to "execute" docker-compose.yml files.
Once your yml file is configured and tested for a specific container, forget all your worries when re-installing PG.
Keep all your yml files safe and just rerun them when needed.

This procedure is based on the "Shell in A Box" container installation as example.

Steps:
- Install docker-compose:
sudo apt install docker-compose
- create a volume folder for your future container
mkdir -p /opt/appdata/siab
- create an empty docker-compose.yml file
touch /opt/appdata/siab/docker-compose.yml
- copy a docker-compose template content to avoid starting from scratch into the docker-compose.yml file
nano /opt/appdata/docker-compose.yml
- copy + paste the following code
---
version: '2'
services:
shellinabox:
image: sspreitzer/shellinabox:latest
restart: always
container_name: siab
labels:
traefik.enable: "true"
traefik.frontend.auth.basic.users: ""
traefik.frontend.headers.customResponseHeaders: "X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex"
traefik.frontend.redirect.entryPoint: "https"
traefik.frontend.rule: "Host:siab.domaine_name.com,"
traefik.port: "4200"
ports:
- "4200:4200"
volumes:
- /:/PG
environment:
- "SIAB_ADDUSER=true"
- "SIAB_USER=siab"
- "SIAB_USERID=9000"
- "SIAB_GROUP=guest"
- "SIAB_GROUPID=9000"
- "SIAB_PASSWORD=YOUR_PASSWORD"
- "SIAB_SHELL=/bin/bash"
- "SIAB_HOME=/home/siab"
- "SIAB_SUDO=true"
- "SIAB_SSL=false"
networks:
default:
external:
name: plexguide


- Close and save the file
CTRL+X
Y

- Run the following command in the volume folder (opt/appdata/siab)
docker-compose up -d

The container is built, run.
Traefik is configured.
Shell in A Box container is ready to be used.

As simple as that.

Sined
I think some of the spacing in the services portion in the bottom comes out incorrect in your post. Might I suggest using the inline code tags so it is displayed correctly.

Specifically:
services:
shellinabox:
image (etc)
require the spacing for it to work such as

Code:
---
version: '2'
services:
  shellinabox:
    image: sspreitzer/shellinabox:latest
    restart: always
    container_name: siab
    labels:
      traefik.enable: "true"
      traefik.frontend.auth.basic.users: ""
      traefik.frontend.headers.customResponseHeaders: "X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex"
      traefik.frontend.redirect.entryPoint: "https"
      traefik.frontend.rule: "Host:siab.domaine_name.com,"
      traefik.port: "4200"
    ports:
      - "4200:4200"
    volumes:
      - /:/PG
    environment:
      - "SIAB_ADDUSER=true"
      - "SIAB_USER=siab"
      - "SIAB_USERID=9000"
      - "SIAB_GROUP=guest"
      - "SIAB_GROUPID=9000"
      - "SIAB_PASSWORD=YOUR_PASSWORD"
      - "SIAB_SHELL=/bin/bash"
      - "SIAB_HOME=/home/siab"
      - "SIAB_SUDO=true"
      - "SIAB_SSL=false"
networks:
  default:
    external:
      name: plexguide
 

plex_noob

Senior Member
Staff
Donor
Can you copy me your compose file. I will check to see if I find the problem.
 

titooo7

Senior Member
Can you copy me your compose file. I will check to see if I find the problem.
Thank you. Here is the docker-compose.yml file for funkwhale:
https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/docker-compose.yml


But please note that the installation guide is based on getting it installed on the directory
cd /srv/funkwhale (guide here: https://docs.funkwhale.audio/installation/docker.html)

I suppose you can change the directory to /opt/appdata if you want to and know which files to edit
 

wrenvx

Junior Member
Hi! Thanks for the great tip for installing 3rd party containers.

I came to issue when installing docker-compose with apt command.
Apparently my server doesn't get the latest issue of docker-compose with "apt install", and installs a version 1.8.0 (very old).
It causes some errors with PG's own container deployment system... somehow.

Instead you can try
curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

This was from https://github.com/docker/compose/releases
 

titooo7

Senior Member
Hi! Thanks for the great tip for installing 3rd party containers.

I came to issue when installing docker-compose with apt command.
Apparently my server doesn't get the latest issue of docker-compose with "apt install", and installs a version 1.8.0 (very old).
It causes some errors with PG's own container deployment system... somehow.

Instead you can try
curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

This was from https://github.com/docker/compose/releases
Try with this:
curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
 

plex_noob

Senior Member
Staff
Donor
Hi,

Yes, I tested the install and had only one error telling me "The SECRET_KEY setting must not be empty." which is a simple configuration issue you could solve.

I am unable to tell you if everything worked but the install went smoothly. I simply followed what is explained on this page, step by step.

Regards

Sined
 

titooo7

Senior Member
Hi,

Yes, I tested the install and had only one error telling me "The SECRET_KEY setting must not be empty." which is a simple configuration issue you could solve.

I am unable to tell you if everything worked but the install went smoothly. I simply followed what is explained on this page, step by step.

Regards

Sined
Thanks for the info. I was able to install it following that page but I couldn't load it.
I guess it could be because I couldn't install Nginx as the port 80 was already being used by aappache. Where you able to install Nginx?
 

titooo7

Senior Member
Why would you need Nginx? Traefik does the same thing.
I know. It's just because the installation guide of funkwhale mentions Nginx is required

I tried to install it without it and it got installed and running according to portainer but funkwhale UI didn't load. And I suppose the reason for that it's because it might be not using the Traefik image that is already part of my Plexguide setup...

In a nutshell, the Funkhwale installation instructions don't seem valid to have it working on a Plexguide install
 

plex_noob

Senior Member
Staff
Donor
Hi,

Some searches combined with some brain work results in this:

mkdir -p /opt/app/data/wordpress
nano /opt/app/data/wordpress/docker-compose.yml

Paste the following code
Code:
---
version: '2'
services:
  wordpress:
    image: wordpress
    restart: always
    links:
     - mariadb:mysql
    environment:
     - WORDPRESS_DB_PASSWORD="test"
    ports:
     - "40080:80"
    volumes:
     - /opt/appdata/wordpress/code:/code
     - /opt/appdata/wordpress/html:/var/www/html
    labels:
      traefik.enable: "true"
      traefik.frontend.headers.customResponseHeaders: "X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex"
      traefik.frontend.redirect.entryPoint: "https"
      traefik.frontend.rule: "Host:wordpress.domain.name,"
      traefik.port: "80"
  mariadb:
    image: mariadb
    environment:
     - MYSQL_ROOT_PASSWORD="test"
     - MYSQL_DATABASE=wordpress
    volumes:
     - /opt/appdata/mariadb:/var/lib/mysql
networks:
  default:
    external:
      name: plexguide
Then docker-compose -f /opt/app/data/wordpress/docker-compose.yml up -d

And that's it.

Point to https://wordpress.domaine.name and there we are.
 

macfreaker

Senior Member
Hi,

Some searches combined with some brain work results in this:

mkdir -p /opt/app/data/wordpress
nano /opt/app/data/wordpress/docker-compose.yml

Paste the following code
Code:
---
version: '2'
services:
  wordpress:
    image: wordpress
    restart: always
    links:
     - mariadb:mysql
    environment:
     - WORDPRESS_DB_PASSWORD="test"
    ports:
     - "40080:80"
    volumes:
     - /opt/appdata/wordpress/code:/code
     - /opt/appdata/wordpress/html:/var/www/html
    labels:
      traefik.enable: "true"
      traefik.frontend.headers.customResponseHeaders: "X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex"
      traefik.frontend.redirect.entryPoint: "https"
      traefik.frontend.rule: "Host:wordpress.domain.name,"
      traefik.port: "80"
  mariadb:
    image: mariadb
    environment:
     - MYSQL_ROOT_PASSWORD="test"
     - MYSQL_DATABASE=wordpress
    volumes:
     - /opt/appdata/mariadb:/var/lib/mysql
networks:
  default:
    external:
      name: plexguide
Then docker-compose -f /opt/app/data/wordpress/docker-compose.yml up -d

And that's it.

Point to https://wordpress.domaine.name and there we are.
I get a bad gateway text in my browser.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Development Donations

 

Top NZB NewsGroups!

Members - Up To a 58% Discount!

Trending

Online statistics

Members online
14
Guests online
117
Total visitors
131
Top