# Docker service template ## Quickstart 1. Install docker and docker-compose (Ubuntu users can use `install_docker.sh` script) 2. Copy environment templates and name them accordingly to remove `default` prefix, eg, `default.env` to `.env` and update environment values inside them 3. Comment out or remove unneeded services from `docker-compose.yaml` 4. Create service files: - `compose/nginx/conf/sites-enabled/` should contain "virtual host" files (active "host" files must end with `.conf`) - Copy `compose/pgdb/docker-entrypoint-initdb.d/00-init-users-db.sh.example` and rename the file to remove suffix `.example` and update the content accordingly to create correct and safe users for services which use database 5. Run `docker-compose pull` 6. Run `docker-compose up certbot` to initialise Let's Encrypt SSL certificates for Nginx HTTPS support. - _Suggestion: for the first run set CB\_STAGING=1 to not hit the LetsEncrypt production certificate rate limit!_ - After receiving `### Let's Encrypt certificate initialization completed!` stop the container (press `[ctrl]+[c]`) - To remove staging certs either remove whole volume or manually delete the staging domains from within the container (`docker-compose exec certbot sh` and `rm -r /etc/letsencrypt/.....`) 7. Run `docker-compose up -d` ## Services - **nginx** - Webserver, one of few "open-port" containers - All static files which are required for other apps have to be linked to nginx container for it to be able to serve those files - **qbit** - qBittorrent client, which is accessible through WebUI - **cloud** - Nextcloud server - **redis** - in-memory key–value database, cache and message broker, with optional durability - **pgdb** - Postgres, is a free and open-source relational database management system - **yopass** - project for sharing secrets in a quick and secure manner - **certbot** - LetsEncrypt SSL certificate generator using DNS method in DigitalOcen as a NameServer - **registry** - Privately hosted DockerRegistry (must generate `compose/nginx/conf/registry.htpasswd` - **gitea** - Privately hosted Git server - **default\_web\_app** - primitive Flask app to serve default nginx template html and display request information at `/req` or `/json` endpoints - **vardadienas** - Flask app to generate and download customisable Latvian nameday calendar `.ics`