diff --git a/docker-basics-and-troubleshoot/readme.md b/docker-basics-and-troubleshoot/readme.md index 35cf08a..34082ff 100644 --- a/docker-basics-and-troubleshoot/readme.md +++ b/docker-basics-and-troubleshoot/readme.md @@ -2,97 +2,19 @@ ###### guide-by-example -![logo](https://i.imgur.com/GrWPooR.png) +![logo](https://i.imgur.com/6SIoRWX.png) -# Purpose +# Overview -For me to wrap head around some shit. -Notes for troubleshooting. +Docker is a container technology that utilizes the host OS's kernel while putting the userland applications into a sandbox. +It is more lightweight than a full-fledged virtual machine, but you're applications need to be compatible with the host OS. -What was at one time tested and should 100% work. +Compose is a Docker tool that allows defining containers using a YAML file and run them with a single command. -# docker-compose +The purpose of docker and docker-compose is either development or deployment.
+Most of the stuff around here is about deployment, how to deploy others people work
-`docker-compose.yml` -```yml -services: - - whoami: - image: "containous/whoami" - container_name: "whoami" - hostname: "whoami" - ports: - - "80:80" -``` +# Basics - -# Scheduling and cron issues - -The default docker-compose deployment uses cron container.
-Problem is it does not work, so Ofelia is used.
-[Here](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/ofelia) -is guide how to set it up. - -Bellow is Ofelia's config file for discovery and ping check of live hosts. - -`config.ini` -```ini -[job-exec "phpipam ping"] -schedule = @every 10m -container = phpipam-web -command = /usr/bin/php /phpipam/functions/scripts/pingCheck.php - -[job-exec "phpipam discovery"] -schedule = @every 25m -container = phpipam-web -command = /usr/bin/php /phpipam/functions/scripts/discoveryCheck.php -``` - -# Reverse proxy - -Caddy v2 is used, details -[here](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/caddy_v2).
- -`Caddyfile` -``` -ipam.{$MY_DOMAIN} { - reverse_proxy phpipam-web:80 -} -``` - -# First run - -![logo](https://i.imgur.com/W7YhwqK.jpg) - - -* New phpipam installation -* Automatic database installation -* MySQL username: root -* MySQL password: my_secret_mysql_root_pass - -# Update - -[Watchtower](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/watchtower) -updates the image automatically. - -Manual image update: - -- `docker-compose pull`
-- `docker-compose up -d`
-- `docker image prune` - -# Backup and restore - -#### Backup - -Using [borg](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/borg_backup) -that makes daily snapshot of the entire directory. - -#### Restore - -* down the homer container `docker-compose down`
-* delete the entire homer directory
-* from the backup copy back the homer directory
-* start the container `docker-compose up -d`