podman -> docker (podman broke)

master
Paul Walko 2021-05-16 21:41:38 -04:00
parent d51d142877
commit 62a78c89ce
16 changed files with 241 additions and 295 deletions

33
fogcutter/docker/airsonic.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 4040 in pew-net
docker run \
--detach \
--name airsonic \
--restart unless-stopped \
--env PUID=1000 \
--env PGID=1000 \
--env TZ=US/Eastern \
--volume /bigdata/k8s-config/airsonic/config:/config:rw \
--volume /bigdata/media/music:/media/music:ro \
--volume /bigdata/media/playlists:/media/playlists:ro \
--volume /bigdata/media/podcasts:/media/podcasts:ro \
--network pew-net \
ghcr.io/linuxserver/airsonic:v10.6.2-ls83
}
down () {
docker stop airsonic || true
docker rm airsonic || true
}
logs () {
docker logs --follow airsonic
}
$@

View File

@ -3,14 +3,15 @@
set -e
up () {
loginctl enable-linger $USER
podman network create pew-net || true
docker network create pew-net || true
# Exposed on port 8080 in pew-net
# env options: https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/.env.example
# Create firefly.env with APP_KEY
podman create \
docker run \
--detach \
--name firefly \
--restart unless-stopped \
--env-file firefly.env \
--env SITE_OWNER=paulsw.pw@gmail.com \
--env TZ=US/Eastern \
@ -24,45 +25,36 @@ up () {
--env APP_URL=https://ff.seaturtle.pw \
--volume /bigdata/k8s-config/firefly/data:/var/www/html/storage/upload:rw \
--network pew-net \
jc5x/firefly-iii:version-5.4.6
podman generate systemd firefly --restart-policy=always --name > $HOME/.config/systemd/user/firefly.service
systemctl --user daemon-reload
systemctl start --user firefly || systemctl restart --user firefly
systemctl enable --user firefly
docker.io/jc5x/firefly-iii:version-5.4.6
# Exposed on port 3306 in pew-net
podman create \
docker run \
--detach \
--name firefly-mariadb \
--restart unless-stopped \
--env MYSQL_RANDOM_ROOT_PASSWORD=notnullvalue \
--env MYSQL_PASSWORD=firefly \
--env MYSQL_DATABASE=firefly \
--env MYSQL_USER=firefly \
--volume /bigdata/k8s-config/firefly/mariadb:/var/lib/mysql:rw \
--network pew-net \
mariadb:10.5.6
podman generate systemd firefly-mariadb --restart-policy=always --name > $HOME/.config/systemd/user/firefly-mariadb.service
systemctl --user daemon-reload
systemctl start --user firefly-mariadb || systemctl restart --user firefly-mariadb
systemctl enable --user firefly-mariadb
docker.io/mariadb:10.5.6
}
down () {
systemctl stop --user firefly || true
systemctl disable --user firefly || true
podman rm firefly || true
systemctl stop --user firefly-mariadb || true
systemctl disable --user firefly-mariadb || true
podman rm firefly-mariadb || true
docker stop firefly || true
docker rm firefly || true
docker stop firefly-mariadb || true
docker rm firefly-mariadb || true
}
logs () {
podman logs -f firefly
docker logs --follow firefly
}
logsm () {
podman logs -f firefly-mariadb
docker logs --follow firefly-mariadb
}
$@

View File

@ -3,12 +3,13 @@
set -e
up () {
loginctl enable-linger $USER
podman network create pew-net || true
docker network create pew-net || true
# Exposed on port 3000 in pew-net
podman create \
docker run \
--detach \
--name gitea \
--restart unless-stopped \
--env RUN_MODE=prod \
--env DOMAIN=git.seaturtle.pw \
--env SSH_DOMAIN=git.seaturtle.pw \
@ -21,24 +22,18 @@ up () {
--volume /bigdata/k8s-config/gitea/data:/data:rw \
--volume /etc/localtime:/etc/localtime:ro \
--volume /etc/timezone:/etc/timezone:ro \
--publish 127.0.0.1:2222:2222 \
--publish 2222:2222 \
--network pew-net \
gitea/gitea:1.12.5
podman generate systemd gitea --restart-policy=always --name > $HOME/.config/systemd/user/gitea.service
systemctl --user daemon-reload
systemctl start --user gitea || systemctl restart --user gitea
systemctl enable --user gitea
docker.io/gitea/gitea:1.12.5
}
down () {
systemctl stop --user gitea || true
systemctl disable --user gitea || true
podman rm gitea || true
docker stop gitea || true
docker rm gitea || true
}
logs () {
podman logs --follow gitea
docker logs --follow gitea
}
$@

33
fogcutter/docker/jellyfin.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 8096 in pew-net
# TODO intel hw acceleration
docker run \
--detach \
--name jellyfin \
--restart unless-stopped \
--env PUID=1000 \
--env PGID=1000 \
--env TZ=US/Eastern \
--volume /bigdata/k8s-config/jellyfin/config:/config:rw \
--volume /bigdata/media/movies:/media/movies:ro \
--volume /bigdata/media/music:/media/music:ro \
--network pew-net \
ghcr.io/linuxserver/jellyfin:10.7.0-1-ls100
}
down () {
docker stop jellyfin || true
docker rm jellyfin || true
}
logs () {
docker logs --follow jellyfin
}
$@

27
fogcutter/docker/minecraft.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
set -e
up () {
docker run \
--detach \
--name minecraft \
--restart unless-stopped \
--env EULA=TRUE \
--env MAX_MEMORY=8G \
--env VERSION=1.15.2 \
--volume /bigdata/k8s-config/minecraft/data:/data:rw \
--publish 127.0.0.1:25565:25565 \
docker.io/itzg/minecraft-server:latest
}
down () {
docker stop minecraft || true
docker rm minecraft || true
}
logs () {
docker logs --follow minecraft
}
$@

View File

@ -3,7 +3,7 @@ Description=Nextcloud cron and scan for any new ebooks
[Service]
Type=simple
ExecStart=/usr/bin/podman exec nextcloud /bin/bash -c "if ! command -v sudo &> /dev/null; then apt-get update && apt-get install -y sudo; fi; sudo -u www-data php -f /var/www/html/cron.php && sudo -u www-data /var/www/html/occ files:scan --path='/pew/files/ebooks'"
ExecStart=/usr/bin/docker exec nextcloud /bin/bash -c "if ! command -v sudo &> /dev/null; then apt-get update && apt-get install -y sudo; fi; sudo -u www-data php -f /var/www/html/cron.php && sudo -u www-data /var/www/html/occ files:scan --path='/pew/files/ebooks'"
[Install]
WantedBy=default.target

View File

@ -0,0 +1,78 @@
#!/bin/bash
set -e
# to scan new files: k exec --stdin --tty nextcloud-POD -npew -- /bin/bash -c "/var/www/html/occ files:scan --path='/USER/files'"
up () {
loginctl enable-linger $USER
docker network create pew-net || true
# Exposed on port 80 in pew-net
# Must edit /var/www/html/config/config.php file after initial setup to change settings
docker run \
--detach \
--name nextcloud \
--restart unless-stopped \
--env OVERWRITEHOST=nc.seaturtle.pw \
--env OVERWRITEPROTOCOL=https \
--env MYSQL_DATABASE=nextcloud \
--env MYSQL_USER=nextcloud \
--env MYSQL_PASSWORD=nextcloud \
--env MYSQL_HOST=nextcloud-mariadb \
--env REDIS_HOST=nextcloud-redis \
--env REDIS_HOST_PASSWORD=nextcloud \
--volume /bigdata/k8s-config/nextcloud/data:/var/www/html:rw \
--network pew-net \
docker.io/nextcloud:20.0.1-apache
# Exposed on port 3306 in pew-net
docker run \
--detach \
--name nextcloud-mariadb \
--restart unless-stopped \
--env MYSQL_RANDOM_ROOT_PASSWORD=notnullvalue \
--env MYSQL_PASSWORD=nextcloud \
--env MYSQL_DATABASE=nextcloud \
--env MYSQL_USER=nextcloud \
--volume /bigdata/k8s-config/nextcloud/mariadb:/var/lib/mysql:rw \
--network pew-net \
docker.io/mariadb:10.5.6
# Exposed on port 6379 in pew-net
docker run \
--detach \
--name nextcloud-redis \
--restart unless-stopped \
--network pew-net \
docker.io/redis:6.0.9 --requirepass nextcloud
# Setup nextcloud cron and continuous scanning for new files
cp nextcloud-cron.service nextcloud-cron.timer $HOME/.config/systemd/user/
systemctl start --user nextcloud-cron.timer || systemctl restart --user nextcloud-cron.timer
systemctl enable --user nextcloud-cron.timer
}
down () {
docker stop nextcloud || true
docker rm nextcloud || true
docker stop nextcloud-mariadb || true
docker rm nextcloud-mariadb || true
docker stop nextcloud-redis || true
docker rm nextcloud-redis || true
}
logs () {
docker logs -f nextcloud
}
logsm () {
docker logs -f nextcloud-mariadb
}
logsr () {
docker logs -f nextcloud-redis
}
$@

View File

@ -3,46 +3,39 @@
set -e
up () {
loginctl enable-linger $USER
podman network create pew-net || true
docker network create pew-net || true
# main nginx container
# for local access hard-code IP in /etc/hosts and use browser addon to force redirect to 8443
podman create \
# for local access hard-code IP in /etc/hosts
docker run \
--detach \
--name nginx \
--restart unless-stopped \
--env PUID=1000 \
--env GUID=1000 \
--env TZ=US/Eastern \
--env URL=seaturtle.pw \
--env SUBDOMAINS=airsonic,cave,ff,git,jf,nc,plex \
--env VALIDATION=http \
--env EMAIL=paulsw.pw@gmail.com \
--env SUBDOMAINS=airsonic,cave,ff,git,jf,nc,plex \
--volume /bigdata/k8s-config/nginx/nginx.conf:/config/nginx/nginx.conf:ro \
--volume /bigdata/files:/files:ro \
--volume /bigdata/k8s-config/nginx/config:/config:rw \
--volume /bigdata/k8s-config/nginx/nginx.conf:/config/nginx/nginx.conf:ro \
--volume /bigdata/k8s-config/nginx/ssl.conf:/config/nginx/ssl.conf:ro \
--volume /bigdata/k8s-config/nginx/site-confs:/config/nginx/site-confs:ro \
--volume /bigdata/archive/cavepedia:/cavepedia:ro \
--publish 127.0.0.1:80:80 \
--publish 443:443 \
--publish 8448:8448 \
--network pew-net \
linuxserver/swag:1.10.1-ls29
podman generate systemd nginx --restart-policy=always --name > $HOME/.config/systemd/user/nginx.service
systemctl --user daemon-reload
systemctl start --user nginx || systemctl restart --user nginx
systemctl enable --user nginx
ghcr.io/linuxserver/swag:1.15.0-ls57
}
down () {
systemctl stop --user nginx || true
systemctl disable --user nginx || true
podman rm nginx || true
docker stop nginx || true
docker rm nginx || true
}
logs () {
podman logs --follow nginx
docker logs --follow nginx
}
$@

33
fogcutter/docker/plex.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 32400 in pew-net
docker run \
--detach \
--name plex \
--restart unless-stopped \
--env PUID=1000 \
--env PGID=1000 \
--env VERSION=docker \
--volume /bigdata/k8s-config/plex/config:/config:rw \
--volume /bigdata/media/movies:/media/movies:ro \
--volume /bigdata/media/music:/media/music:ro \
--volume /media-vtluug:/media/media-vtluug:ro \
--network pew-net \
ghcr.io/linuxserver/plex:1.20.3.3483-211702a9f-ls122
}
down () {
docker stop plex || true
docker rm plex || true
}
logs () {
docker logs --follow plex
}
$@

View File

@ -1,38 +0,0 @@
#!/bin/bash
set -e
up () {
loginctl enable-linger $USER
podman network create pew-net || true
# Exposed on port 4040 in pew-net
podman create \
--name airsonic \
--env PUID=1000 \
--env PGID=1000 \
--env TZ=US/Eastern \
--volume /bigdata/k8s-config/airsonic/config:/config:rw \
--volume /bigdata/media/music:/media/music:ro \
--volume /bigdata/media/playlists:/media/playlists:ro \
--volume /bigdata/media/podcasts:/media/podcasts:ro \
--network pew-net \
linuxserver/airsonic:v10.6.2-ls83
podman generate systemd airsonic --restart-policy=always --name > $HOME/.config/systemd/user/airsonic.service
systemctl --user daemon-reload
systemctl start --user airsonic || systemctl restart --user airsonic
systemctl enable --user airsonic
}
down () {
systemctl stop --user airsonic || true
systemctl disable --user airsonic || true
podman rm airsonic || true
}
logs () {
podman logs --follow airsonic
}
$@

View File

@ -1,38 +0,0 @@
#!/bin/bash
set -e
up () {
loginctl enable-linger $USER
podman network create pew-net || true
# Exposed on port 8096 in pew-net
# TODO intel hw acceleration
podman create \
--name jellyfin \
--env PUID=1000 \
--env PGID=1000 \
--env TZ=US/Eastern \
--volume /bigdata/k8s-config/jellyfin/config:/config:rw \
--volume /bigdata/media/movies:/media/movies:ro \
--volume /bigdata/media/music:/media/music:ro \
--network pew-net \
ghcr.io/linuxserver/jellyfin:10.6.4-1-ls89
podman generate systemd jellyfin --restart-policy=always --name > $HOME/.config/systemd/user/jellyfin.service
systemctl --user daemon-reload
systemctl start --user jellyfin || systemctl restart --user jellyfin
systemctl enable --user jellyfin
}
down () {
systemctl stop --user jellyfin || true
systemctl disable --user jellyfin || true
podman rm jellyfin || true
}
logs () {
podman logs --follow jellyfin
}
$@

View File

@ -1,33 +0,0 @@
#!/bin/bash
set -e
up () {
loginctl enable-linger $USER
podman create \
--name minecraft \
--env EULA=TRUE \
--env MAX_MEMORY=8G \
--env VERSION=1.15.2 \
--volume /bigdata/k8s-config/minecraft/data:/data:rw \
--publish 127.0.0.1:25565:25565 \
itzg/minecraft-server:latest
podman generate systemd minecraft --restart-policy=always --name > $HOME/.config/systemd/user/minecraft.service
systemctl --user daemon-reload
systemctl start --user minecraft || systemctl restart --user minecraft
systemctl enable --user minecraft
}
down () {
systemctl stop --user minecraft || true
systemctl disable --user minecraft || true
podman rm minecraft || true
}
logs () {
podman logs --follow minecraft
}
$@

View File

@ -1,91 +0,0 @@
#!/bin/bash
set -e
# to scan new files: k exec --stdin --tty nextcloud-POD -npew -- /bin/bash -c "/var/www/html/occ files:scan --path='/USER/files'"
up () {
loginctl enable-linger $USER
podman network create pew-net || true
# Exposed on port 80 in pew-net
# Must edit /var/www/html/config/config.php file after initial setup to change settings
podman create \
--name nextcloud \
--env OVERWRITEHOST=nc.seaturtle.pw \
--env OVERWRITEPROTOCOL=https \
--env MYSQL_DATABASE=nextcloud \
--env MYSQL_USER=nextcloud \
--env MYSQL_PASSWORD=nextcloud \
--env MYSQL_HOST=nextcloud-mariadb \
--env REDIS_HOST=nextcloud-redis \
--env REDIS_HOST_PASSWORD=nextcloud \
--volume /bigdata/k8s-config/nextcloud/data:/var/www/html:rw \
--network pew-net \
nextcloud:20.0.1-apache
podman generate systemd nextcloud --restart-policy=always --name > $HOME/.config/systemd/user/nextcloud.service
systemctl --user daemon-reload
systemctl start --user nextcloud || systemctl restart --user nextcloud
systemctl enable --user nextcloud
# Exposed on port 3306 in pew-net
podman create \
--name nextcloud-mariadb \
--env MYSQL_RANDOM_ROOT_PASSWORD=notnullvalue \
--env MYSQL_PASSWORD=nextcloud \
--env MYSQL_DATABASE=nextcloud \
--env MYSQL_USER=nextcloud \
--volume /bigdata/k8s-config/nextcloud/mariadb:/var/lib/mysql:rw \
--network pew-net \
mariadb:10.5.6
podman generate systemd nextcloud-mariadb --restart-policy=always --name > $HOME/.config/systemd/user/nextcloud-mariadb.service
systemctl --user daemon-reload
systemctl start --user nextcloud-mariadb || systemctl restart --user nextcloud-mariadb
systemctl enable --user nextcloud-mariadb
# Exposed on port 6379 in pew-net
podman create \
--name nextcloud-redis \
--network pew-net \
redis:6.0.9 --requirepass nextcloud
podman generate systemd nextcloud-redis --restart-policy=always --name > $HOME/.config/systemd/user/nextcloud-redis.service
systemctl --user daemon-reload
systemctl start --user nextcloud-redis || systemctl restart --user nextcloud-redis
systemctl enable --user nextcloud-redis
# Setup nextcloud cron and continuous scanning for new files
cp nextcloud-cron.service nextcloud-cron.timer $HOME/.config/systemd/user/
systemctl start --user nextcloud-cron.timer || systemctl restart --user nextcloud-cron.timer
systemctl enable --user nextcloud-cron.timer
}
down () {
systemctl stop --user nextcloud || true
systemctl disable --user nextcloud || true
podman rm nextcloud || true
systemctl stop --user nextcloud-mariadb || true
systemctl disable --user nextcloud-mariadb || true
podman rm nextcloud-mariadb || true
systemctl stop --user nextcloud-redis || true
systemctl disable --user nextcloud-redis || true
podman rm nextcloud-redis || true
systemctl stop --user nextcloud-cron.timer || true
systemctl disable --user nextcloud-cron.timer || true
}
logs () {
podman logs -f nextcloud
}
logsm () {
podman logs -f nextcloud-mariadb
}
logsr () {
podman logs -f nextcloud-redis
}
$@

View File

@ -1,38 +0,0 @@
#!/bin/bash
set -e
up () {
loginctl enable-linger $USER
podman network create pew-net || true
# Exposed on port 32400 in pew-net
podman create \
--name plex \
--env PUID=1000 \
--env PGID=1000 \
--env VERSION=docker \
--volume /bigdata/k8s-config/plex/config:/config:rw \
--volume /bigdata/media/movies:/media/movies:ro \
--volume /bigdata/media/music:/media/music:ro \
--volume /media-vtluug:/media/media-vtluug:ro \
--network pew-net \
linuxserver/plex:1.20.3.3483-211702a9f-ls122
podman generate systemd plex --restart-policy=always --name > $HOME/.config/systemd/user/plex.service
systemctl --user daemon-reload
systemctl start --user plex || systemctl restart --user plex
systemctl enable --user plex
}
down () {
systemctl stop --user plex || true
systemctl disable --user plex || true
podman rm plex || true
}
logs () {
podman logs --follow plex
}
$@