Compare commits
131 Commits
1e4d6f679d
...
master
Author | SHA1 | Date | |
---|---|---|---|
5de347550b | |||
077b0e801d | |||
69f957e46a | |||
92e02c856b | |||
097d2dc2d1 | |||
d4e93f3dc7 | |||
fad304521b | |||
f52e1c10bc | |||
d8ea386388 | |||
466c30dde6 | |||
7a8a74f7ec | |||
ba42ac52b8 | |||
7468a242a4 | |||
cbd3eac827 | |||
029a3197b0 | |||
becd731912 | |||
38ebcd3084 | |||
317f6772e9 | |||
b273ef0785 | |||
e6fc23fb52 | |||
ca2aea93e1 | |||
706e916d92 | |||
ce1890fa34 | |||
4193af75fc | |||
9effe13a7d | |||
0d3a08a0c0 | |||
3db462229d | |||
5be61dae6b | |||
6d3f43fe9f | |||
fea3aa0d08 | |||
71e301154d | |||
621273c988 | |||
eb38948134 | |||
b5326b8412 | |||
5c1126d493 | |||
859a90e149 | |||
ade5d19e45 | |||
06439fd958 | |||
3d12753c3b | |||
35aaf2b703 | |||
0a38dc1a28 | |||
6d014b55b7 | |||
51563f932c | |||
141f360387 | |||
aed8156c81 | |||
255fcb0dc1 | |||
427d136048 | |||
35225919c8 | |||
bd87cfbde2 | |||
9c253348ab | |||
a950c7fbfd | |||
1d649a7913 | |||
6f001937de | |||
f6b56015c1 | |||
fc8c533c26 | |||
1b0a78517c | |||
b6f19f4dd4 | |||
2a2f146a24 | |||
36c29ae557 | |||
8bd8cfd5f4 | |||
d04bd06ebe | |||
bad85adb4a | |||
fa7f8c42aa | |||
eb175b0eb2 | |||
16c526634c | |||
4904215464 | |||
33b5ce0499 | |||
e7a1cc1dec | |||
0e2aa4429d | |||
bdd9664f60 | |||
cf25811ff1 | |||
4e67931400 | |||
ddc1c69c06 | |||
2d10670d56 | |||
dafd9e20c7 | |||
e720c771ff | |||
1974152a7f | |||
ad5b76116a | |||
b4c4aa4c64 | |||
55e59c183f | |||
767413c4bd | |||
009963fe0f | |||
605ad5053a | |||
85cd2abb3b | |||
d9ab180b90 | |||
a30001228d | |||
d401e475ea | |||
b77bdeaa3d | |||
d9a2b8cfaf | |||
212e5f71ab | |||
8432789521 | |||
a6f3623b36 | |||
f7090510b1 | |||
66ef92ab55 | |||
0212098e2d | |||
fd8c05d670 | |||
f1b7c210f0 | |||
355b953c83 | |||
c285ff4fb2 | |||
d890a82558 | |||
2b34f97d8c | |||
a982ef8b44 | |||
bb7bc29974 | |||
6eaa63e641 | |||
088c60a8c3 | |||
345301e6e7 | |||
2b543aa802 | |||
1fa93b9259 | |||
c936863033 | |||
9d6a641b0e | |||
02289b3d22 | |||
4d8c545b7a | |||
0c25f8043a | |||
02a8e6cdfe | |||
c850e10721 | |||
c938e633ef | |||
9bb0044130 | |||
7600c45175 | |||
c6ba9ac150 | |||
76b26c9c32 | |||
364fac4738 | |||
c1506a436d | |||
5699b3ba1f | |||
3b7dd0552f | |||
07482cbd9e | |||
ceea046203 | |||
a336f35ca0 | |||
23dc363646 | |||
0506f02b43 | |||
055f2169dc | |||
210549bc05 |
53
.drone.yml
@ -6,8 +6,7 @@ clone:
|
||||
disable: false
|
||||
|
||||
steps:
|
||||
- name: testing-jekyll
|
||||
pull: always
|
||||
- name: testing
|
||||
image: jekyll/jekyll:latest
|
||||
commands:
|
||||
- touch Gemfile.lock
|
||||
@ -18,7 +17,7 @@ steps:
|
||||
- bundle install
|
||||
- bundle exec jekyll build
|
||||
|
||||
- name: ssh commands
|
||||
- name: deploying
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
@ -26,16 +25,31 @@ steps:
|
||||
username:
|
||||
from_secret: homelab_user
|
||||
key:
|
||||
from_secret: homelab_pwd
|
||||
port: 22
|
||||
from_secret: homelab_key
|
||||
port:
|
||||
from_secret: homelab_port
|
||||
script:
|
||||
- bash ~/scripts/sthopedevupdate
|
||||
- bash /scripts/ssh_website_pull
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
|
||||
- name: semantic-release
|
||||
image: cenk1cenk2/drone-semantic-release
|
||||
settings:
|
||||
semantic_release: true
|
||||
git_method: cr
|
||||
git_user_name:
|
||||
from_secret: user_gitea
|
||||
git_user_email:
|
||||
from_secret: email_gitea
|
||||
git_login:
|
||||
from_secret: user_gitea
|
||||
git_password:
|
||||
from_secret: gitea_token
|
||||
update_readme_toc: true
|
||||
|
||||
- name: discord
|
||||
pull: always
|
||||
image: appleboy/drone-discord
|
||||
avatar_url: "https://git.sthope.dev/sthope/drone_test/raw/branch/master/rick.png"
|
||||
environment:
|
||||
@ -61,16 +75,19 @@ steps:
|
||||
```
|
||||
🌐 <{{ build.link }}>
|
||||
{{/success}}
|
||||
|
||||
# when:
|
||||
# event:
|
||||
# - push
|
||||
# - tag
|
||||
# - pull_request
|
||||
# - deployment
|
||||
# status:
|
||||
# - changed
|
||||
# - failure
|
||||
# - success
|
||||
when:
|
||||
status:
|
||||
- failure
|
||||
|
||||
|
||||
# # when:
|
||||
# # event:
|
||||
# # - push
|
||||
# # - tag
|
||||
# # - pull_request
|
||||
# # - deployment
|
||||
# # status:
|
||||
# # - changed
|
||||
# # - failure
|
||||
# # - success
|
||||
|
||||
|
72
.releaserc
Normal file
@ -0,0 +1,72 @@
|
||||
---
|
||||
branch: master
|
||||
preset: "angular"
|
||||
tagFormat: "${version}"
|
||||
plugins:
|
||||
- "@semantic-release/commit-analyzer"
|
||||
- "@semantic-release/release-notes-generator"
|
||||
- "@semantic-release/changelog"
|
||||
- "@semantic-release/git"
|
||||
- "@semantic-release/github"
|
||||
|
||||
verifyConditions:
|
||||
- '@semantic-release/git'
|
||||
- "@semantic-release/github"
|
||||
analyzeCommits:
|
||||
- path: "@semantic-release/commit-analyzer"
|
||||
releaseRules:
|
||||
- type: "feat"
|
||||
release: "patch"
|
||||
- type: "hotfix"
|
||||
release: "patch"
|
||||
- type: "patch"
|
||||
release: "patch"
|
||||
- type: "minor"
|
||||
release: "minor"
|
||||
- type: "breaking"
|
||||
release: "major"
|
||||
generateNotes:
|
||||
- path: "@semantic-release/release-notes-generator"
|
||||
writerOpts:
|
||||
groupBy: "type"
|
||||
commitGroupsSort:
|
||||
- "feat"
|
||||
- "perf"
|
||||
- "fix"
|
||||
commitsSort: "header"
|
||||
types:
|
||||
- type: "feat"
|
||||
- section: "Features"
|
||||
# Tracked bug fix with a hotfix branch
|
||||
- type: "hotfix"
|
||||
- section: "Bug Fixes"
|
||||
# Uninmportent fix (CI testing, etc)
|
||||
- type: "fix"
|
||||
- hidden: true
|
||||
- type: "chore"
|
||||
- hidden: true
|
||||
- type: "docs"
|
||||
- hidden: true
|
||||
- type: "doc"
|
||||
- hidden: true
|
||||
- type: "style"
|
||||
- hidden: true
|
||||
- type: "refactor"
|
||||
- hidden: true
|
||||
- type: "perf"
|
||||
- hidden: true
|
||||
- type: "test"
|
||||
- hidden: true
|
||||
presetConfig: true
|
||||
prepare:
|
||||
- path: "@semantic-release/git"
|
||||
- path: "@semantic-release/changelog"
|
||||
changelogFile: "docs/CHANGELOG.md"
|
||||
publish:
|
||||
- path: "@semantic-release/github"
|
||||
|
||||
success:
|
||||
- "@semantic-release/github"
|
||||
|
||||
fail:
|
||||
- "@semantic-release/github"
|
2
404.html
@ -16,7 +16,7 @@ permalink: /404.html
|
||||
|
||||
<div class="error-text">
|
||||
<a href="{{ site.baseurl }}/">Home</a> |
|
||||
<a href="{{ site.baseurl }}/by-year/">All Posts</a> |
|
||||
<a href="{{ site.baseurl }}/by-year">All Posts</a> |
|
||||
<a href="{{ site.baseurl }}/search/">Search</a>
|
||||
</div>
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
# [Sthope.dev](https://www.Sthope.dev)
|
||||
|
||||
[](https://drone.sthope.dev/sthope/website)
|
||||
|
||||
|
||||
Installing Drone-CLI
|
||||
```
|
||||
curl -L https://github.com/drone/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx;sudo install -t /usr/local/bin drone
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
- name: tuya_doorlock
|
||||
- name: randompwd
|
||||
- name: randomport
|
||||
- name: mqtt-broker
|
||||
- name: dckrtmplt
|
||||
tuya_doorlock:
|
||||
randompwd:
|
||||
randomport:
|
||||
mqtt-broker:
|
||||
dckrtmplt:
|
79
_drafts/2021-09-03-ssh-keys.md
Normal file
@ -0,0 +1,79 @@
|
||||
---
|
||||
layout: post
|
||||
title: "SSH Keys"
|
||||
description: ""
|
||||
author: sthope
|
||||
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
|
||||
```
|
||||
|
||||
Replace `very_long_secret` with the long generated password and replace `/opt/.certs/service` with the location for your keys and the name (different name for each key "service")
|
||||
Default generally is `~/.ssh/id_rsa`, you can omit `-f "/opt/.certs/service"` if you don't want to choose it.
|
||||
```
|
||||
ssh-keygen -t rsa -b 4096 -f "/opt/.certs/service" -C "Private Key Comment"
|
||||
```
|
||||
|
||||
Key should be created along also with .pub key
|
||||
|
||||
```
|
||||
eval $(ssh-agent -s)
|
||||
ssh-add /opt/.certs/service
|
||||
ssh-copy-id -i /opt/.certs/service USERNAME@IP -p PORT
|
||||
```
|
||||
Login one last time using your old username and password and remember to disable them or remove them.
|
||||
<br>
|
||||
|
||||
After that you can login into the host with:
|
||||
```
|
||||
ssh -i /opt/.certs/service -p PORT USERNAME@IP
|
||||
```
|
||||
<br>
|
||||
|
||||
Or you can go little further and create file:
|
||||
```
|
||||
sudo nano /etc/ssh/ssh_config.d/myssh.conf
|
||||
```
|
||||
<br>
|
||||
|
||||
With:
|
||||
```
|
||||
Host 192.168.1.*
|
||||
AddKeysToAgent yes
|
||||
IdentityFile /opt/.certs/service
|
||||
Port 22
|
||||
|
||||
Host service.local 192.168.1.2
|
||||
User USERNAME
|
||||
HostName 192.168.1.2
|
||||
|
||||
### Github.com
|
||||
# don't forget to add the .pub key into your profile
|
||||
Host github.com
|
||||
User git
|
||||
Hostname github.com
|
||||
AddKeysToAgent yes
|
||||
IdentityFile /opt/.certs/github
|
||||
|
||||
### Gitea
|
||||
# don't forget to add the .pub key into your profile
|
||||
Host gitea.com
|
||||
User git
|
||||
Hostname gitea.com
|
||||
AddKeysToAgent yes
|
||||
IdentityFile /opt/.certs/gitea
|
||||
|
||||
### Gitlab
|
||||
# don't forget to add the .pub key into your profile
|
||||
Host gitlab.com
|
||||
User git
|
||||
Hostname gitlab.com
|
||||
AddKeysToAgent yes
|
||||
IdentityFile /opt/.certs/gitlab
|
||||
```
|
||||
Now you should be able to connect using `ssh service` or ssh git clone your repos from respective git repository
|
||||
Test if it's working with: ```ssh -T git@github.com```
|
@ -4,8 +4,8 @@
|
||||
|
||||
<ul class="pages">
|
||||
<li><a href="{{ site.baseurl }}/"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ site.baseurl }}/by-year/"><i class="fa fa-archive"></i> All Posts</a></li>
|
||||
<li><a href="https://git.sthope.dev/sthope/docker_portainer_stacks" target="_blank"><i class="fas fa-cubes"></i> Portainer Stacks</a></li>
|
||||
<li><a href="{{ site.baseurl }}/by-year"><i class="fa fa-archive"></i> All Posts</a></li>
|
||||
<li><a href="https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks" target="_blank"><i class="fas fa-cubes"></i> Portainer Stacks</a></li>
|
||||
<li><a href="https://git.sthope.dev/sthope?tab=&sort=recentupdate&q=proxmox" target="_blank"><i class="fab fa-product-hunt"></i> Proxmox LXC's</a></li>
|
||||
<li><a href="{{ site.baseurl }}/dockercontainers"><i class="fab fa-docker"></i> My Docker Containers</a></li>
|
||||
<li><a href="{{ site.baseurl }}/search/"><i class="fa fa-search"></i> Search</a></li>
|
||||
|
@ -45,7 +45,7 @@ layout: default
|
||||
<ul style="list-style-type:upper-roman">
|
||||
{% for item in site.data.mydockercontainers %}
|
||||
<li>
|
||||
<a href="https://github.com/users/Sthopeless/packages/container/package/{{ item.name }}" target="_blank"> {{ item.name }}</a>
|
||||
<a href="https://github.com/users/Sthopeless/packages/container/package/{{ item }}" target="_blank"> {{ item }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@ -20,3 +20,7 @@ This website is a documentation of my adventures with electronics in general. Th
|
||||
|
||||
|
||||
Hello and welcome to my website, where I explorer the world of electronics and technology.
|
||||
|
||||
|
||||
He said "You are the chosen one, the one who will deliver the message, a message of hope for those who choose to hear it and a warning for those who do not."
|
||||
Me, the chosen one, they chose me and I didn't even graduate from fuckin' high school
|
63
_posts/2021-07-25-jekyll-website.md
Normal 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.
|
@ -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 . ; \
|
||||
|
@ -12,7 +12,7 @@ doublecmd_dark: "https://doublecmd.sourceforge.io/gallery/images/MainWindowDark.
|
||||
---
|
||||

|
||||
|
||||
<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"
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||

|
||||
|
||||
**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>
|
||||
|
@ -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
|
||||
---
|
||||
|
||||
|
@ -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)
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
---
|
||||
|
@ -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.
|
39
_posts/2021-09-02-portainer-agent.md
Normal 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
|
||||
```
|
||||
|
||||

|
||||
<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
|
||||

|
||||
<br>
|
||||
<br>
|
||||
Copy `EDGE_ID` and `EDGE_KEY`
|
||||

|
||||

|
||||
<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
|
||||
|
56
_posts/2021-09-03-openssh-server-docker-ci.md
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Openssh-server Docker Container"
|
||||
description: ""
|
||||
author: sthope
|
||||
image:
|
||||
categories: [ Docker, Portainer, SSH ]
|
||||
comments: true
|
||||
---
|
||||
|
||||
First create openssh-server configuration folders:
|
||||
```
|
||||
mkdir -p ~/docker/openssh-server/{config,ssh}
|
||||
```
|
||||
<br>
|
||||
|
||||
Portainer Stack:
|
||||
```yaml
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
openssh-server:
|
||||
image: ghcr.io/linuxserver/openssh-server:latest
|
||||
container_name: openssh-server
|
||||
hostname: my_server
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/Amsterdam
|
||||
- DOCKER_MODS=linuxserver/mods:openssh-server-rsync|linuxserver/mods:openssh-server-openssh-client|linuxserver/mods:openssh-server-git
|
||||
- PUBLIC_KEY_FILE=~/docker/openssh-server/ssh
|
||||
- PASSWORD_ACCESS=false
|
||||
- SUDO_ACCESS=true
|
||||
volumes:
|
||||
- ~/docker/openssh-server/config:/config
|
||||
- ~/docker/openssh-server/ssh:/root/.ssh
|
||||
- ~/docker:/my_server
|
||||
ports:
|
||||
- 2222:2222
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
After is running configure your ssh keys, you can generate new ones with command:
|
||||
```
|
||||
docker run --rm -it --entrypoint /keygen.sh linuxserver/openssh-server
|
||||
```
|
||||
|
||||
And after keys are configured you can ssh with:
|
||||
```
|
||||
ssh -i /root/.ssh/your_key -p PORT USERNAME@IP
|
||||
```
|
||||
|
||||
And from your Docker terminal you can enter the container with:
|
||||
```
|
||||
docker exec -it openssh-server /bin/bash
|
||||
```
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
layout: post
|
||||
title: "SSH Keys"
|
||||
description: ""
|
||||
author: sthope
|
||||
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
|
||||
```
|
||||
|
||||
Replace `very_long_secret` with the long generated password and replace `/opt/.certs/service` with the location for your keys and the name (different name for each key "service")
|
||||
Default generally is `~/.ssh/id_rsa`, you can omit `-f "/opt/.certs/service"` if you don't want to choose it.
|
||||
```
|
||||
ssh-keygen -t rsa -b 4096 -f "/opt/.certs/service" -C "Hopeless Automations"
|
||||
```
|
||||
|
98
_posts/2021-09-04-portainer-oauth-authentication.md
Normal file
@ -0,0 +1,98 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Portainer OAuth Authentication"
|
||||
description: "Login into Portainer using your Github account or even better.. your private Gitea account (with 2FA)"
|
||||
author: sthope
|
||||
image:
|
||||
categories: [ Docker, Portainer, OAuth ]
|
||||
comments: true
|
||||
pic01: "/assets/images/portainer_oauth/1.png"
|
||||
pic02: "/assets/images/portainer_oauth/2.png"
|
||||
pic03: "/assets/images/portainer_oauth/3.png"
|
||||
pic04: "/assets/images/portainer_oauth/4.png"
|
||||
pic05: "/assets/images/portainer_oauth/5.png"
|
||||
pic06: "/assets/images/portainer_oauth/6.png"
|
||||
pic07: "/assets/images/portainer_oauth/7.png"
|
||||
pic08: "/assets/images/portainer_oauth/8.png"
|
||||
pic09: "/assets/images/portainer_oauth/9.png"
|
||||
pic10: "/assets/images/portainer_oauth/10.png"
|
||||
---
|
||||
|
||||
|
||||
# Github
|
||||
Login into Github and go to https://github.com/settings/profile on the right side menu near the end enter `Developer settings` and select `OAuth Apps`
|
||||
<img src="{{page.pic02}}"/>
|
||||
<img src="{{page.pic03}}"/>
|
||||
<br>
|
||||
<br>
|
||||
Create your app details
|
||||
<img src="{{page.pic04}}"/>
|
||||
`Application name`: Whatever you wanna call it
|
||||
`Homepage URL`: eg: http://IP:9000
|
||||
`Application description`: can be empty
|
||||
`Authorization callback URL`: eg: http://IP:9000
|
||||
<br>
|
||||
<br>
|
||||
After Github creates the application click on `Generate a new client secret` and copy `Client ID` and the `Secret` it created.
|
||||
<img src="{{page.pic05}}"/>
|
||||
<br>
|
||||
This is it Github Part is finish!
|
||||
<br>
|
||||
|
||||
# Portainer
|
||||
|
||||
Open Portainer UI and go to `Settings` on the right side menu then click on `Authentication` under it.
|
||||
<img src="{{page.pic08}}"/>
|
||||
|
||||
Now choose this options, you can use other `Session lifetime` if you want
|
||||
<img src="{{page.pic09}}"/>
|
||||
`Automatic user provisioning`: If set ON anyone with Github account will be able to login and Portainer will automaticily create the user without authorizations, better leave it off and handle the users creation/allowance to you.
|
||||
|
||||
### OAuth Configuration
|
||||
|
||||
<img src="{{page.pic10}}"/>
|
||||
|
||||
| :-------------------- | :------------------------------------------ |
|
||||
| **Client ID** | ClientID you copied from Github |
|
||||
| **Client secret** | Secret you copied from Github |
|
||||
| **Authorization URL** | https://github.com/login/oauth/authozize |
|
||||
| **Access token URL** | https://github.com/login/oauth/access_token |
|
||||
| **Resource URL** | https://api.github.com/user |
|
||||
| **Redirect URL** | your Portainer URL eg: http://IP:9000 |
|
||||
| **Logout URL** | *leave empty* |
|
||||
| **User identifier** | login |
|
||||
| **Scopes** | id,email,name |
|
||||
|
||||
Remember Gitea Username and Portainer Username need to math otherwise create a new username in Portainer with same name or enable `Automatic user provisioning` and then after login disable it again
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
# Gitea
|
||||
|
||||
For Gitea instead of Github, enter your user `Settings` and go to `Applications` and create a new one.
|
||||
|
||||
<img src="{{page.pic06}}"/>
|
||||
`Redirect URL`= use your Portainer URL, eg: http://IP:9000
|
||||
|
||||
<br>
|
||||
|
||||
After that is created, Gitea will give you the ClientID and Secret you should save to use with Portainer.
|
||||
<img src="{{page.pic07}}"/>
|
||||
|
||||
Now for Gitea the configs are a little different, follow:
|
||||
|
||||
| :-------------------- | :---------------------------------------- |
|
||||
| **Client ID** | ClientID you copied from Gitea |
|
||||
| **Client secret** | Secret you copied from Gitea |
|
||||
| **Authorization URL** | http://GITEA_URL/login/oauth/authorize |
|
||||
| **Access token URL** | http://GITEA_URL/login/oauth/access_token |
|
||||
| **Resource URL** | http://GITEA_URL/login/oauth/userinfo |
|
||||
| **Redirect URL** | your Portainer URL eg: http://IP:9000 |
|
||||
| **Logout URL** | *leave empty* |
|
||||
| **User identifier** | preferred_username |
|
||||
| **Scopes** | *leave empty* |
|
||||
|
||||
Should now be configured and you should be able to login using your Gitea Account
|
||||
|
||||
Remember Gitea Username and Portainer Username need to math otherwise create a new username in Portainer with same name or enable `Automatic user provisioning` and then after login disable it again
|
83
_posts/2021-09-05-gitea.md
Normal file
@ -0,0 +1,83 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Gitea"
|
||||
description: "Gitea docker container"
|
||||
author: sthope
|
||||
image:
|
||||
categories: [ Docker, Portainer, Gitea, Git ]
|
||||
comments: true
|
||||
pic01: "/assets/images/portainer_oauth/1.png"
|
||||
pic02: "/assets/images/portainer_oauth/2.png"
|
||||
pic03: "/assets/images/portainer_oauth/3.png"
|
||||
pic04: "/assets/images/portainer_oauth/4.png"
|
||||
pic05: "/assets/images/portainer_oauth/5.png"
|
||||
pic06: "/assets/images/portainer_oauth/6.png"
|
||||
pic07: "/assets/images/portainer_oauth/7.png"
|
||||
pic08: "/assets/images/portainer_oauth/8.png"
|
||||
pic09: "/assets/images/portainer_oauth/9.png"
|
||||
pic10: "/assets/images/portainer_oauth/10.png"
|
||||
---
|
||||
|
||||
Portainer Stack:
|
||||
```yaml
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
networks:
|
||||
EXTERNAL:
|
||||
external:
|
||||
name: EXTERNAL
|
||||
INTERNAL:
|
||||
external:
|
||||
name: INTERNAL
|
||||
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:latest
|
||||
restart: unless-stopped
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
networks:
|
||||
- EXTERNAL
|
||||
- INTERNAL
|
||||
volumes:
|
||||
- /gitea/data:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "22:22"
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
depends_on:
|
||||
- gitea_db
|
||||
|
||||
gitea_db:
|
||||
image: ghcr.io/linuxserver/mariadb:latest
|
||||
container_name: gitea_db
|
||||
networks:
|
||||
- INTERNAL
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- MYSQL_ROOT_PASSWORD=qtzZzVt4sRcAt682
|
||||
- MYSQL_DATABASE=z7twLnmEmK7A3FMv
|
||||
- MYSQL_USER=b2nngTxbJXbGUHkz
|
||||
- MYSQL_PASSWORD=yBDK68gAwJrp3Pgp
|
||||
- TZ=Europe/Lisbon
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /gitea/db:/config
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
- hide_db_container=true
|
||||
```
|
||||
If you are running reverse proxy in same docker you might not need the `ports` in the stack, otherwise change them from the default.
|
||||
Also before running the container, create the folders for Gitea and the DB and change the `volumes` to math.
|
||||
Run on the Terminal `id $USER` to know what are your `PUID`/`USER_UID` and `PGID`/`USER_GID`.
|
||||
|
||||
|
||||
|
||||
<small>[Official Documentation](https://docs.gitea.io/en-us/install-with-docker/)</small>
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 112 KiB |
BIN
assets/images/portainer-agent/1.jpg
Normal file
After Width: | Height: | Size: 153 KiB |
BIN
assets/images/portainer-agent/2.jpg
Normal file
After Width: | Height: | Size: 234 KiB |
BIN
assets/images/portainer-agent/3.jpg
Normal file
After Width: | Height: | Size: 173 KiB |
BIN
assets/images/portainer-agent/4.jpg
Normal file
After Width: | Height: | Size: 180 KiB |
BIN
assets/images/portainer_oauth/1.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
assets/images/portainer_oauth/10.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
assets/images/portainer_oauth/2.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
assets/images/portainer_oauth/3.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
assets/images/portainer_oauth/4.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
assets/images/portainer_oauth/5.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
assets/images/portainer_oauth/6.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
assets/images/portainer_oauth/7.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
assets/images/portainer_oauth/8.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/portainer_oauth/9.png
Normal file
After Width: | Height: | Size: 67 KiB |
@ -16,7 +16,7 @@ make-smaller-titles: true
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ site.baseurl }}/by-year/">Years</a></li>
|
||||
<li><a href="{{ site.baseurl }}/by-year">Years</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -16,7 +16,7 @@ make-smaller-titles: true
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ site.baseurl }}/by-categories/">Categories</a></li>
|
||||
<li><a href="{{ site.baseurl }}/by-categories">Categories</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -43,7 +43,7 @@ make-smaller-titles: true
|
||||
|
||||
{% endfor %}
|
||||
<li>
|
||||
<small><i><a href="{{ site.baseurl }}/by-year/">more...</a></i></small>
|
||||
<small><i><a href="{{ site.baseurl }}/by-year">more...</a></i></small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
49
package.json
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "@semantic-release/gitlab",
|
||||
"version": "1.1.1",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"release": {
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
[
|
||||
"@semantic-release/npm",
|
||||
{
|
||||
"npmPublish": false
|
||||
}
|
||||
],
|
||||
"@semantic-release/changelog",
|
||||
"@semantic-release/git"
|
||||
],
|
||||
"branch": "master"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^5.0.1",
|
||||
"@semantic-release/commit-analyzer": "^8.0.1",
|
||||
"@semantic-release/git": "^9.0.0",
|
||||
"@semantic-release/npm": "^7.0.5",
|
||||
"@semantic-release/release-notes-generator": "^9.0.1",
|
||||
"@types/express": "^4.17.6",
|
||||
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
||||
"@typescript-eslint/parser": "^2.28.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-airbnb-base": "^14.1.0",
|
||||
"eslint-config-prettier": "^6.10.1",
|
||||
"eslint-import-resolver-typescript": "^2.0.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-prettier": "^3.1.3",
|
||||
"prettier": "^2.0.4",
|
||||
"semantic-release": "^17.0.6",
|
||||
"ts-node-dev": "^1.0.0-pre.44",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.17.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev:server": "ts-node-dev --inspect --transpileOnly --ignore-watch node_modules src/server.ts"
|
||||
}
|
||||
}
|
||||
|