initial commit

This commit is contained in:
2021-09-02 18:01:03 +02:00
commit 229f86d94b
43 changed files with 1063 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# Portainer
Docker-compose stack with Portainer, VSCode, WatchTower
Install with 1 line cmd (running as sudo/root)
```
clear;bash -c "$(wget -qLO - https://git.sthope.dev/sthope/docker_portainer_stacks/raw/branch/master/portainer/script/install_nosudo)"
```
download docker-compose.yml with:
```
wget https://git.sthope.dev/sthope/docker_portainer_stacks/raw/branch/master/portainer/docker-compose.yml
```
# Portainer Agent
```
bash -c "$(wget -qLO - https://git.sthope.dev/sthope/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

@ -0,0 +1,48 @@
---
version: "3.8"
services:
portainer:
container_name: portainer
image: portainer/portainer-ce:latest
restart: unless-stopped
network_mode: bridge
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/docker/portainer:/data
ports:
- 8000:8000
- 9000:9000
labels:
- com.centurylinklabs.watchtower.enable=true
vscode:
image: ghcr.io/linuxserver/code-server:latest
container_name: vscode
network_mode: bridge
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Amsterdam
- PASSWORD=bTWsTrs5uyuJjz6PG6
- SUDO_PASSWORD=TKMSajXxJ9Pj9uDFe4
volumes:
- ~/docker/vscode:/config
- ~/docker:/config/workspace/server
ports:
- 8443:8443
labels:
- com.centurylinklabs.watchtower.enable=true
watchtower:
container_name: watchtower
image: containrrr/watchtower:latest
restart: unless-stopped
network_mode: bridge
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- TZ=Europe/Amsterdam
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=86400
- WATCHTOWER_LABEL_ENABLE=true

View File

@ -0,0 +1,22 @@
#!/bin/bash
###################################
############ by Sthope ############
###################################
#### USAGE
# bash -c "$(wget -qLO - https://git.sthope.dev/sthope/docker_portainer_stacks/raw/branch/master/portainer/install-portainer-agent)" EDGE_ID EDGE_KEY
#
sudo docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
-v /:/host \
-v portainer_agent_data:/data \
--restart always \
-e EDGE=1 \
-e EDGE_ID=${1} \
-e EDGE_KEY=${2} \
-e CAP_HOST_MANAGEMENT=1 \
--label=hide_container=true \
--name portainer_edge_agent \
portainer/agent

View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
###################################
############ by Sthope ############
###################################
## nano ~/.bashrc
## and add this to the end of the file: export PATH=$PATH:~/bin
## sudo chmod +x ~/bin/*;su -l $USER
#### USAGE
# bash -c "$(wget -qLO - https://git.sthope.dev/sthope/docker_portainer_stacks/raw/branch/master/portainer/script/install_nosudo)"
#
apt-get update
apt-get upgrade -y
bash -c "$(wget -qLO - https://git.sthope.dev/sthope/docker_portainer_stacks/raw/branch/master/docker-compose/config.sh)"
mkdir -p /docker/portainer
mkdir -p /docker/vscode
wget https://git.sthope.dev/sthope/docker_portainer_stacks/raw/branch/master/portainer/docker-compose.yml -P /docker/
cd /test/;docker-compose up -d