Guides - HOWTO: Install third-party container with automatic Traefik configuration | PlexGuide.com

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

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

plex_noob

Elite
Original poster
Staff
Donor
Oct 1, 2018
224
113
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:
  • Like
Reactions: 1 users

Freiner

Citizen
May 18, 2018
13
6
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

Experienced
Staff
Mar 16, 2018
85
40
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

Citizen+
Oct 24, 2018
18
5
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

VIP
Staff
Donor
Sep 12, 2018
369
193
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
 
  • Like
Reactions: 2 users

plex_noob

Elite
Original poster
Staff
Donor
Oct 1, 2018
224
113
Thanks for your feedback.

Done!
 
  • Like
Reactions: 1 user

plex_noob

Elite
Original poster
Staff
Donor
Oct 1, 2018
224
113
Can you copy me your compose file. I will check to see if I find the problem.
 

titooo7

Veteran
Jul 31, 2018
154
30
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

Citizen
Oct 26, 2018
10
2
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

Veteran
Jul 31, 2018
154
30
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

Elite
Original poster
Staff
Donor
Oct 1, 2018
224
113
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

Veteran
Jul 31, 2018
154
30
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

Veteran
Jul 31, 2018
154
30
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

Elite
Original poster
Staff
Donor
Oct 1, 2018
224
113
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.
 
  • Like
Reactions: 3 users

macfreaker

Veteran
Jul 16, 2018
152
60
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.
 

Recommend NewsGroups

      Up To a 58% Discount!

Trending