diff --git a/docker-reset.bash b/docker-reset.bash
index 98e38d0..8ef3e4f 100644
--- a/docker-reset.bash
+++ b/docker-reset.bash
@@ -3,22 +3,24 @@
# Docker clean up guilde https://gist.github.com/bastman/5b57ddb3c11942094f8d0a97d461b430
# kill all containers
+echo "*** Killing All Containers ***"
docker stop $(docker ps -aq)
+echo "*** Docker prune ***"
docker system prune
-#remove all containers
-#docker rm $(docker ps -aq)
-
#remove all images
-#docker rmi $(docker images -q)
+echo "*** Removing all Docker images ***"
+docker rmi $(docker images -q)
#delete all volumnes
-#docker volume rm $(docker volume ls -qf dangling=true)
-#docker volume ls -qf dangling=true | xargs -r docker volume rm
+echo "*** Removing all Docker volumes ***"
+docker volume rm $(docker volume ls -qf dangling=true)
+docker volume ls -qf dangling=true | xargs -r docker volume rm
#remove all networks
+echo "*** Removing all Docker Networks ***"
docker network prune
-#docker network ls
-#docker network ls | grep "bridge"
-#docker network rm $(docker network ls | grep "bridge" | awk '/ / { print $1 }')
+docker network rm $(docker network ls | grep "bridge" | awk '/ / { print $1 }')
+
+echo "*** All done ***"
diff --git a/matomo/docker-compose.yml b/matomo/docker-compose.yml
new file mode 100644
index 0000000..023eeb4
--- /dev/null
+++ b/matomo/docker-compose.yml
@@ -0,0 +1,50 @@
+################################################################################
+# matomo
+#
+# Version 1
+#
+################################################################################
+version: '3.3'
+
+volumes:
+ matomodb:
+ matomo:
+ matomoconfig:
+ matomologs:
+
+networks:
+ admin_web:
+ external:
+ name: admin_web
+
+services:
+
+ matomodb:
+ image: mariadb:${DB_V}
+ restart: always
+ volumes:
+ - matomodb:/var/lib/mysql
+ networks:
+ - admin_web
+ environment:
+ MYSQL_ROOT_PASSWORD: ${MATOMO_MYSQL_ROOT_PASSWORD}
+ MYSQL_PASSWORD: ${MATOMO_MYSQL_PASSWORD}
+ MYSQL_DATABASE: matomo
+ MYSQL_USER: matomo
+
+ # https://hub.docker.com/_/matomo/
+ matomo:
+ image: matomo:${MATOMO_V}
+ volumes:
+ - matomo:/var/www/html
+ - matomoconfig:/var/www/html/config
+ - matomologs:/var/www/html/logs
+ networks:
+ - admin_web
+ restart: always
+ labels:
+ - "traefik.enable=true"
+ - "traefik.http.routers.${PREFIX}_nextcloud.rule=Host(`${MATOMO_DOMAIN_NAME}`)"
+ - "traefik.http.routers.${PREFIX}_nextcloud.entrypoints=websecure"
+ - "traefik.http.routers.${PREFIX}_nextcloud.tls.certresolver=letsencrypt"
+ - "traefik.http.services.${PREFIX}_nextcloud.loadbalancer.server.port=80"
diff --git a/matomo/env-sample b/matomo/env-sample
new file mode 100644
index 0000000..6751da2
--- /dev/null
+++ b/matomo/env-sample
@@ -0,0 +1,11 @@
+# Domains & Project
+PREFIX=p1
+MATOMO_DOMAIN_NAME=matomo.nickyeoman.com
+
+# Passwords
+MATOMO_MYSQL_ROOT_PASSWORD=ChangeMe2ASecurepass!
+MATOMO_MYSQL_PASSWORD=Again2ASecurepass!
+
+# Software versions
+DB_V=10.4.0
+MATOMO_V=3.7.0
diff --git a/portainer/docker-compose.yml b/portainer/docker-compose.yml
index 7a139ce..0396ec5 100644
--- a/portainer/docker-compose.yml
+++ b/portainer/docker-compose.yml
@@ -4,7 +4,7 @@
# Change .env then
# docker-compose up -d
#
-# Version 1
+# Version 2
################################################################################
version: '2'
@@ -27,6 +27,7 @@ services:
- admin_web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
+ - ./templates/templates.json:/templates.json
- portainer:/data
command: -H unix:///var/run/docker.sock
labels:
diff --git a/portainer/templates/templates.json b/portainer/templates/templates.json
new file mode 100644
index 0000000..81a37fa
--- /dev/null
+++ b/portainer/templates/templates.json
@@ -0,0 +1,396 @@
+[
+ {
+ "type": 1,
+ "title": "Nix Registry",
+ "description": "Docker image registry by nick 20",
+ "categories": ["docker"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/registry.png",
+ "image": "registry:latest",
+ "ports": [
+ "5000/tcp"
+ ],
+ "volumes": [{ "container": "/var/lib/registry"}]
+ },
+ {
+ "type": 1,
+ "title": "Nix MariaDB",
+ "description": "Performance beyond MySQL",
+ "categories": ["database"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/mariadb.png",
+ "image": "mariadb:latest",
+ "env": [
+ {
+ "name": "MYSQL_ROOT_PASSWORD",
+ "label": "Root password"
+ }
+ ],
+ "ports": [
+ "3306/tcp"
+ ],
+ "volumes": [{"container": "/var/lib/mysql"}]
+ },
+ {
+ "type": 1,
+ "title": "Nix PostgreSQL",
+ "description": "The most advanced open-source database",
+ "categories": ["database"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/postgres.png",
+ "image": "postgres:latest",
+ "env": [
+ {
+ "name": "POSTGRES_USER",
+ "label": "Superuser"
+ },
+ {
+ "name": "POSTGRES_PASSWORD",
+ "label": "Superuser password"
+ }
+ ],
+ "ports": [
+ "5432/tcp"
+ ],
+ "volumes": [{"container": "/var/lib/postgresql/data"}]
+ },
+ {
+ "type": 1,
+ "title": "Gitlab CE",
+ "description": "Nix Open-source end-to-end software development platform",
+ "note": "Default username is root. Check the Gitlab documentation to get started.",
+ "categories": ["development", "project-management"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/gitlab_ce.png",
+ "image": "gitlab/gitlab-ce:latest",
+ "ports": [
+ "80/tcp",
+ "443/tcp",
+ "22/tcp"
+ ],
+ "volumes": [
+ { "container": "/etc/gitlab" },
+ { "container": "/var/log/gitlab" },
+ { "container": "/var/opt/gitlab" }
+ ]
+ },
+ {
+ "type": 1,
+ "title": "Redis",
+ "description": "Open-source in-memory data structure store",
+ "categories": ["database"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/redis.png",
+ "image": "redis:latest",
+ "ports": [
+ "6379/tcp"
+ ],
+ "volumes": [{"container": "/data"}]
+ },
+ {
+ "type": 1,
+ "title": "RabbitMQ",
+ "description": "Highly reliable enterprise messaging system",
+ "categories": ["messaging"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/rabbitmq.png",
+ "image": "rabbitmq:latest",
+ "ports": [
+ "5671/tcp",
+ "5672/tcp"
+ ],
+ "volumes": [{"container": "/var/lib/rabbitmq"}]
+ },
+ {
+ "type": 1,
+ "title": "Ghost",
+ "description": "Free and open-source blogging platform",
+ "categories": ["blog"],
+ "note": "Access the blog management interface under /ghost/.",
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/ghost.png",
+ "image": "ghost:latest",
+ "ports": [
+ "2368/tcp"
+ ],
+ "volumes": [{"container": "/var/lib/ghost/content"}]
+ },
+ {
+ "type": 1,
+ "title": "Joomla",
+ "description": "Another free and open-source CMS",
+ "categories": ["CMS"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/joomla.png",
+ "image": "joomla:latest",
+ "env": [
+ {
+ "name": "JOOMLA_DB_HOST",
+ "label": "MySQL database host",
+ "type": "container"
+ },
+ {
+ "name": "JOOMLA_DB_PASSWORD",
+ "label": "Database password"
+ }
+ ],
+ "ports": [
+ "80/tcp"
+ ],
+ "volumes": [{"container": "/var/www/html"}]
+ },
+ {
+ "type": 1,
+ "title": "Wowza",
+ "description": "Streaming media server",
+ "categories": ["streaming"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/wowza.png",
+ "image": "sameersbn/wowza:4.1.2-8",
+ "env": [
+ {
+ "name": "WOWZA_ACCEPT_LICENSE",
+ "label": "Agree to Wowza EULA",
+ "set": "yes"
+ },
+ {
+ "name": "WOWZA_KEY",
+ "label": "License key"
+ }
+ ],
+ "ports": [
+ "1935/tcp",
+ "8086/tcp",
+ "8087/tcp",
+ "8088/tcp"
+ ],
+ "volumes": [{"container": "/var/lib/wowza"}]
+ },
+ {
+ "type": 1,
+ "title": "Redmine",
+ "description": "Open-source project management tool",
+ "categories": ["project-management"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/redmine.png",
+ "image": "redmine:latest",
+ "ports": [
+ "3000/tcp"
+ ],
+ "volumes": [{"container": "/usr/src/redmine/files"}]
+ },
+ {
+ "type": 1,
+ "title": "Odoo",
+ "description": "Open-source business apps",
+ "categories": ["project-management"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/odoo.png",
+ "image": "odoo:latest",
+ "env": [
+ {
+ "name": "HOST",
+ "label": "PostgreSQL database host",
+ "type": "container"
+ },
+ {
+ "name": "USER",
+ "label": "Database user"
+ },
+ {
+ "name": "PASSWORD",
+ "label": "Database password"
+ }
+ ],
+ "ports": [
+ "8069/tcp"
+ ],
+ "volumes": [{"container": "/var/lib/odoo"}, {"container": "/mnt/extra-addons"}]
+ },
+ {
+ "type": 1,
+ "title": "Urbackup",
+ "description": "Open-source network backup",
+ "categories": ["backup"],
+ "platform": "linux",
+ "note": "This application web interface is exposed on the port 55414 inside the container.",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/urbackup.png",
+ "image": "cfstras/urbackup",
+ "ports": [
+ "55413/tcp", "55414/tcp", "55415/tcp", "35622/tcp"
+ ],
+ "volumes": [{"container": "/var/urbackup"}]
+ },
+ {
+ "type": 1,
+ "title": "File browser",
+ "description": "A web file manager",
+ "note": "Default credentials: admin/admin",
+ "categories": ["filesystem", "storage"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/filebrowser.png",
+ "image": "filebrowser/filebrowser:latest",
+ "ports": [
+ "80/tcp"
+ ],
+ "volumes": [{"container": "/data"}, {"container": "/srv"}],
+ "command": "--port 80 --database /data/database.db --scope /srv"
+ },
+ {
+ "type": 2,
+ "title": "Portainer Agent",
+ "description": "Manage all the resources in your Swarm cluster",
+ "note": "The agent will be deployed globally inside your cluster and available on port 9001.",
+ "categories": ["portainer"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/portainer.png",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/portainer-agent/docker-stack.yml"
+ }
+ },
+ {
+ "type": 2,
+ "title": "OpenFaaS",
+ "name": "func",
+ "description": "Serverless functions made simple",
+ "note": "Deploys the API gateway and sample functions. You can access the UI on port 8080. Warning: the name of the stack must be 'func'.",
+ "categories": ["serverless"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/openfaas.png",
+ "repository": {
+ "url": "https://github.com/openfaas/faas",
+ "stackfile": "docker-compose.yml"
+ }
+ },
+ {
+ "type": 2,
+ "title": "IronFunctions",
+ "description": "Open-source serverless computing platform",
+ "note": "Deploys the IronFunctions API and UI.",
+ "categories": ["serverless"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/ironfunctions.png",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/ironfunctions/docker-stack.yml"
+ }
+ },
+ {
+ "type": 2,
+ "title": "CockroachDB",
+ "description": "CockroachDB cluster",
+ "note": "Deploys an insecure CockroachDB cluster, please refer to CockroachDB documentation for production deployments.",
+ "categories": ["database"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/cockroachdb.png",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/cockroachdb/docker-stack.yml"
+ }
+ },
+ {
+ "type": 2,
+ "title": "Wordpress",
+ "description": "Wordpress setup with a MySQL database",
+ "note": "Deploys a Wordpress instance connected to a MySQL database.",
+ "categories": ["CMS"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/wordpress.png",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/wordpress/docker-stack.yml"
+ },
+ "env": [
+ {
+ "name": "MYSQL_DATABASE_PASSWORD",
+ "label": "Database root password",
+ "description": "Password used by the MySQL root user."
+ }
+ ]
+ },
+ {
+ "type": 3,
+ "title": "Wordpress",
+ "description": "Wordpress setup with a MySQL database",
+ "note": "Deploys a Wordpress instance connected to a MySQL database.",
+ "categories": ["CMS"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/wordpress.png",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/wordpress/docker-compose.yml"
+ },
+ "env": [
+ {
+ "name": "MYSQL_DATABASE_PASSWORD",
+ "label": "Database root password",
+ "description": "Password used by the MySQL root user."
+ }
+ ]
+ },
+ {
+ "type": 2,
+ "title": "Microsoft OMS Agent",
+ "description": "Microsoft Operations Management Suite Linux agent.",
+ "categories": ["OPS"],
+ "platform": "linux",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/microsoft.png",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/microsoft-oms/docker-stack.yml"
+ },
+ "env": [
+ {
+ "name": "AZURE_WORKSPACE_ID",
+ "label": "Workspace ID",
+ "description": "Azure Workspace ID"
+ },
+ {
+ "name": "AZURE_PRIMARY_KEY",
+ "label": "Primary key",
+ "description": "Azure primary key"
+ }
+ ]
+ },
+ {
+ "title": "Sematext Docker Agent",
+ "type": 2,
+ "categories": ["Log Management", "Monitoring"],
+ "description": "Collect logs, metrics and docker events",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/sematext_agent.png",
+ "platform": "linux",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/sematext-agent-docker/docker-stack.yml"
+ },
+ "env": [
+ {
+ "name": "LOGSENE_TOKEN",
+ "label": "Logs token"
+ },
+ {
+ "name": "SPM_TOKEN",
+ "label": "SPM monitoring token"
+ }
+ ]
+ },
+ {
+ "title": "Datadog agent",
+ "type": 2,
+ "categories": ["Monitoring"],
+ "description": "Collect events and metrics",
+ "logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/datadog_agent.png",
+ "platform": "linux",
+ "repository": {
+ "url": "https://github.com/portainer/templates",
+ "stackfile": "stacks/datadog-agent/docker-stack.yml"
+ },
+ "env": [
+ {
+ "name": "API_KEY",
+ "label": "Datadog API key"
+ }
+ ]
+ }
+]