Browse Source

App Submission: Portainer (#774)

Co-authored-by: Luke Childs <lukechilds123@gmail.com>
Co-authored-by: Mayank Chhabra <mayankchhabra9@gmail.com>
main
Nathan Fretz 1 year ago
committed by GitHub
parent
commit
0f7a8dd951
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      portainer/default-password
  2. 36
      portainer/docker-compose.yml
  3. 47
      portainer/entrypoint.sh
  4. 56
      portainer/umbrel-app.yml

1
portainer/default-password

@ -0,0 +1 @@
changeme

36
portainer/docker-compose.yml

@ -0,0 +1,36 @@
version: "3.7"
services:
app_proxy:
environment:
APP_HOST: portainer_portainer_1
APP_PORT: 9000
docker:
image: docker:24.0.5-dind
privileged: true
network_mode: host
stop_grace_period: 1m
restart: on-failure
environment:
DOCKER_ENSURE_BRIDGE: "dind0:10.32.0.1/16"
entrypoint: /entrypoint.sh
command: >
dockerd
--bridge dind0
--data-root /data/data
--exec-root /data/exec
--host unix:///data/docker.sock
--pidfile /data/docker.pid
volumes:
- ${APP_DATA_DIR}/entrypoint.sh:/entrypoint.sh
- ${APP_DATA_DIR}/data/docker:/data
portainer:
image: portainer/portainer-ce:2.19.0
command: --host unix:///var/run/docker.sock --admin-password-file=/default-password
restart: on-failure
volumes:
- ${APP_DATA_DIR}/default-password:/default-password
- ${APP_DATA_DIR}/data/portainer:/data
- ${APP_DATA_DIR}/data/docker:/var/run

47
portainer/entrypoint.sh

@ -0,0 +1,47 @@
#!/bin/sh
# This hack can be removed if https://github.com/docker-library/docker/pull/444 gets merged.
# Remove docker pidfile if it exists to ensure Docker can start up after a bad shutdown
pidfile="/var/run/docker.pid"
if [[ -f "${pidfile}" ]]
then
rm -f "${pidfile}"
fi
# Use nftables as the backend for iptables
for command in iptables iptables-restore iptables-restore-translate iptables-save iptables-translate
do
ln -sf /sbin/xtables-nft-multi /sbin/$command
done
# Ensure that a bridge exists with the given name
ensure_bridge_exists() {
local name="${1}"
local ip_range="${2}"
# Check if the bridge already exists
if ip link show "${name}" &>/dev/null
then
echo "Bridge '${name}' already exists. Skipping creation."
ip addr show "${name}"
return
fi
echo "Bridge '${name}' does not exist. Creating..."
ip link add "${name}" type bridge
ip addr add "${ip_range}" dev "${name}"
ip link set "${name}" up
echo "Bridge '${name}' is now up with IP range '${ip_range}'."
ip addr show "${name}"
}
if [[ "${DOCKER_ENSURE_BRIDGE}" != "" ]]
then
bridge="${DOCKER_ENSURE_BRIDGE%%:*}"
ip_range="${DOCKER_ENSURE_BRIDGE#*:}"
ensure_bridge_exists "${bridge}" "${ip_range}"
fi
exec dockerd-entrypoint.sh $@

56
portainer/umbrel-app.yml

@ -0,0 +1,56 @@
manifestVersion: 1
id: portainer
category: developer
name: Portainer
version: "2.19.0"
tagline: Run custom Docker containers on your Umbrel
description: >-
⚠️ Make sure to only use named Docker volumes for your stacks and containers. Data in bind-mounted volumes
will be lost when the Portainer app is restarted or updated.
⚠️ Watch out for port conflicts between your custom Docker containers and your umbrelOS apps.
Portainer is the ultimate Docker management solution that simplifies running Docker containers and Docker Compose
setups on your Umbrel, putting comprehensive control at your fingertips.
Portainer provides seamless container management, allowing you to efficiently monitor, start, stop, and
modify containers, networks, volumes, and images. You can also deploy multi-container applications using Docker Compose
with ease.
🛠️ Portainer on Umbrel is for power users, follow these best practices to avoid issues:
1. Data persistence: Make sure to only used named Docker volumes for your stacks and containers. Data in bind-mounted
volumes will be lost when the Portainer app is restarted or updated.
2. Port management: Watch out for potential port conflicts between your custom containers and umbrelOS' service containers,
apps you have installed from the Umbrel App Store or Community App Stores, and any apps you go to install in the future.
3. Container restart policy: Set your containers to "unless-stopped" or "always" restart policies. This will allow your containers
to restart automatically when the Portainer app is restarted or updated.
4. Web access to containers: Access your custom containers in your browser at umbrel.local:<mapped-port>. For example, for a container
with a web UI running on port 4545, navigate to umbrel.local:4545 to access it.
website: https://portainer.io
dependencies: []
repo: https://github.com/portainer/portainer
support: https://github.com/portainer/portainer/issues
port: 9000
gallery:
- 1.jpg
- 2.jpg
- 3.jpg
path: ""
defaultUsername: "admin"
defaultPassword: "changeme"
releaseNotes: ""
developer: Portainer
submitter: Umbrel
submission: https://github.com/getumbrel/umbrel-apps/pull/774
Loading…
Cancel
Save