Docker and Portainer
- Installing docker, cockpit and portainer
- Installing source control using gitea
- Installing leantime project manager
- Installing Dashy
- Install Portainer on new binglab server
Installing docker, cockpit and portainer
Install Docker
curl -fsSL get.docker.com -o get-docker.sh sh get-docker.sh
usermod -aG docker root
systemctl start docker
sudo systemctl enable docker
Install cockpit and cockpit docker plugin
yum install cockpit cockpit-docker
systemctl enable --now cockpit.socket
Install Portainer 2.x
docker volume create portainer_data
docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
Installing source control using gitea
Using portainer stacks to install Gitea source control:
version: "3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:1.15.10
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3030:3000"
- "222:22"
YouTube video of installing gitea on portainer/docker
Installing leantime project manager
Using portainer to install leantime:
version: '3.3' # not sure if version
services: #services section
db:
image: mysql:5.7
container_name: mysql_leantime
volumes:
- db_data:/var/lib/mysql
restart: always
environment: #Environment section
MYSQL_ROOT_PASSWORD: '321.qwerty'
MYSQL_DATABASE: 'leantime'
MYSQL_USER: 'admin'
MYSQL_PASSWORD: '321.qwerty'
command: --character-set-server=utf8 --collation-server=utf8_unicode_ci
web:
image: leantime/leantime:latest
container_name: leantime
environment:
LEAN_DB_HOST: 'mysql_leantime'
LEAN_DB_USER: 'admin'
LEAN_DB_PASSWORD: '321.qwerty'
LEAN_DB_DATABASE: 'leantime'
ports:
- "2080:80"
depends_on:
- db
volumes:
db_data: {}
You tube video of installing leantime:
Installing Dashy
Great landing page to access your self-hosted applications:
https://github.com/Lissy93/dashy
Docker compose file/stack for portainer:
---
version: "3.8"
services:
dashy:
container_name: Dashy
# Pull latest image from DockerHub
image: lissy93/dashy
# Set port that web service will be served on. Keep container port as 80
ports:
- 4000:80
# Set any environmental variables
environment:
- NODE_ENV=production
# Specify restart policy
restart: unless-stopped
# Configure healthchecks
healthcheck:
test: ['CMD', 'node', '/app/services/healthcheck']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
You tube video of install of Dashy
Install Portainer on new binglab server
Here we are gong to be install just portainer on a docker installation on ubuntu:
## Check to see if docker is running
docker ps
## Command to show Docker images
docker images
## Command to create a volume and its name
docker volume create portainer_data
## Docker command to run the container using the persistant volume created earlier and and to always restart
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
## Verify Docker container is running
docker ps
## Verify Source/docker IP address of Main system
ip a