initial commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-09-04 02:52:02 +02:00
parent 055f2169dc
commit 0506f02b43
24 changed files with 136 additions and 32 deletions

View File

@@ -0,0 +1,63 @@
---
layout: post
title: "Jekyll Docker Website"
description: ""
author: sthope
image:
categories: [ Docker, Jekyll ]
comments: true
---
# Portainer Stack
```yaml
---
version: "3.8"
services:
jekyll:
image: "jekyll/jekyll:latest"
container_name: "jekyll"
hostname: "jekyll"
command: "jekyll serve --force_polling"
network_mode: "bridge"
environment:
- "TZ=Europe/Amsterdam"
volumes:
- "/edit/this:/srv/jekyll"
ports:
- "4000:4000"
restart: "unless-stopped"
volumes:
jekyll:
external: false
```
Create folder with eg: ```mkdir -p ~/jekyll``` and change the Volume
# Portainer Stack with Volumes
```yaml
---
version: "3.8"
services:
jekyll:
image: "jekyll/jekyll:latest"
container_name: "jekyll"
hostname: "jekyll"
command: "jekyll serve --force_polling"
network_mode: "bridge"
environment:
- "TZ=Europe/Amsterdam"
volumes:
- "jekyll:/srv/jekyll"
ports:
- "4000:4000"
restart: "unless-stopped"
volumes:
jekyll:
external: false
```
** Good for testing, not recommended for production. **
```
sudo docker exec -it jekyll /bin/sh -c 'jekyll new /srv/jekyll/ --blank --force'
```
Send this from the terminal to initiate a blank website.

View File

@@ -7,7 +7,7 @@ image: "dockergithub.png"
categories: [ Docker, Github ]
github_create_token: 'https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token'
github_auth: 'https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry'
docker_tempalte_repo: 'https://github.com/Sthopeless/dckrtmplt'
docker_template_repo: 'https://github.com/Sthopeless/dckrtmplt'
comments: true
---
@@ -29,7 +29,7 @@ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
## Setup container files
1. [Download this repository]({{page.docker_tempalte_repo}})
1. [Download this repository]({{page.docker_template_repo}})
2. Open terminal, go to the repo location (eg: ~/Documents/dckrtmplt) and do:
```
docker build -t dckrtmplt . ; \

View File

@@ -12,7 +12,7 @@ doublecmd_dark: "https://doublecmd.sourceforge.io/gallery/images/MainWindowDark.
---
![logo]({{page.logo}})
<h2><a href="https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/doublecommander.yml" target="_blank">Portainer Stack</a></h2>
<h2><a href="https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/doublecommander.yml" target="_blank">Portainer Stack</a></h2>
```
---
version: "3.8"

View File

@@ -7,7 +7,7 @@ image: "firefox.png"
categories: [ Docker, Portainer, Stack, LinuxServer ]
comments: true
logo: "/assets/images/doublecommander.png"
stack: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/firefox.yml"
stack: "https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/firefox.yml"
---
<h2><a href="{{page.stack}}" target="_blank">Portainer Stack</a></h2>
@@ -42,7 +42,7 @@ volumes:
<br>
Use `Repository URL`:
```
https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/firefox.yml
https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/firefox.yml
```
<br>
<br>

View File

@@ -6,8 +6,8 @@ author: sthope
image:
categories: [ Docker, Portainer, Stack, LinuxServer, HTPC ]
comments: true
env_file: https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/htpc/config.env
stack_file: https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/htpc/docker-compose.yml
env_file: https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/htpc/config.env
stack_file: https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/htpc/docker-compose.yml
htpc_example: /assets/images/htpc_example.png
---
***Containers:***
@@ -32,7 +32,7 @@ Download or copy the contents from [this file]({{page.env_file}}) and edit with
![example]({{page.htpc_example}})
**Repository URL:** <br>
```https://git.sthope.dev/sthope/docker_portainer_stacks``` <br>
```https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks``` <br>
**Compose path:** <br>
```htpc/docker-compose.yml``` <br>
<br>

View File

@@ -5,7 +5,7 @@ description: "Docker NGINX & Authelia"
author: sthope
image: "nginx-logo.png"
categories: [ Docker, NGINX, LinuxServer ]
env_file: https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/nginx/nginx.env
env_file: https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/nginx/nginx.env
comments: true
---

View File

@@ -46,8 +46,8 @@ Now you should be able to send your command from the terminal, the file name is
<h2 id="part5">Extra</h2>
SSH without asking for password.<br>
Create file named `sshnopwd` and paste the [contents of this file](https://git.sthope.dev/sthope/sthope_website_examples/raw/branch/master/custom-cmds-in-ubuntu/bin_examples/sshnopwd)<br>
Create file named `sshnopwd` and paste the [contents of this file](https://git.sthope.dev/sthope/sthope-examples/src/branch/master/custom-cmds-in-ubuntu/bin_examples/sshnopwd)<br>
now instead of using `ssh username@ip` and then entering password, simply run `sshnopwd password username@ip` and it will automatically login.<br>
Small collection with more examples can be found [here](https://git.sthope.dev/sthope/sthope_website_examples/src/branch/master/custom-cmds-in-ubuntu/bin_examples)
Small collection with more examples can be found [here](https://git.sthope.dev/sthope/sthope-examples/src/branch/master/custom-cmds-in-ubuntu/bin_examples)

View File

@@ -20,7 +20,7 @@ pic12: "/assets/images/portainer_stacks/12.jpg"
pic13: "/assets/images/portainer_stacks/13.jpg"
pic14: "/assets/images/portainer_stacks/14.jpg"
pic15: "/assets/images/portainer_stacks/15.jpg"
stack_example: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/libreoffice.yml"
stack_example: "https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/libreoffice.yml"
comments: true
---
### Installling Portainer

View File

@@ -6,11 +6,11 @@ author: sthope
image: samba-logo.png
comments: true
categories: [ Docker, Samba, Portainer, Stacks ]
samba_repo: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/samba"
env_file: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/samba/config.env"
dockercompose: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/samba/samba.yml"
samba_repo: "https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/samba"
env_file: "https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/samba/config.env"
dockercompose: "https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/samba/samba.yml"
samba_portainer_example: "/assets/images/samba_example.png"
repository_url: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master"
repository_url: "https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master"
compose_path: "samba/samba.yml"
---

View File

@@ -53,7 +53,7 @@ Save and reboot, system should now automatically login into the new user instead
<br>
1-Line command, replace Username and Password with your details and run:
```
bash -c "$(wget -qLO - https://git.sthope.dev/sthope/sthope_website_examples/raw/branch/master/custom-cmds-in-ubuntu/bin_examples/proxmox_addnewuser)" Username Password
bash -c "$(wget -qLO - https://git.sthope.dev/sthope/sthope-examples/src/branch/master/custom-cmds-in-ubuntu/bin_examples/proxmox_addnewuser)" Username Password
```
It will Update & Upgrade system, install sudo, create Username with Password provided and give new created User `sudo` and `docker` permissions.

View File

@@ -0,0 +1,39 @@
---
layout: post
title: "Portainer Agent"
description: "Connection multiple Docker Hosts in one Portainer instance"
author: sthope
image:
categories: [ Docker, Portainer, Portainer Agent ]
comments: true
pic01: "/assets/images/portainer-agent/1.jpg"
pic02: "/assets/images/portainer-agent/2.jpg"
pic03: "/assets/images/portainer-agent/3.jpg"
pic04: "/assets/images/portainer-agent/4.jpg"
---
# Portainer Edge Agent
<br>
Open `Endpoints` tab on Portainer:
```
http://Portainer_IP:9000/#!/endpoints
```
![pic01]({{page.pic01}})
<br>
1. Select `Edge Agent`.
2. Give it a `Name` (generally hostname of the instance you are adding).
3. `Portainer server URL` is the url of your Portainer: http://Portainer_IP:9000
![pic02]({{page.pic02}})
<br>
<br>
Copy `EDGE_ID` and `EDGE_KEY`
![pic03]({{page.pic03}})
![pic04]({{page.pic04}})
<br>
On the terminal of host you are going to add to Portainer send:
```
bash -c "$(wget -qLO - https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/raw/branch/master/portainer/install-portainer-agent)" EDGE_ID EDGE_KEY
```
Replace `EDGE_ID` and `EDGE_KEY` with ones given by Portainer

View File

@@ -7,8 +7,6 @@ image:
categories: [ ssh, ssh keys ]
comments: true
---
Generate a long random password with:
```
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n 1