Cleanup
Port bugfix README Ubuntu's docker install script update
This commit is contained in:
34
README.md
Normal file
34
README.md
Normal file
@ -0,0 +1,34 @@
|
||||
# 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 tempalte html and display request information at `/req` or `/json` endpoints
|
||||
|
||||
- **vardadienas** - private Flask app to generate and download customisable Latvian nameday calendar `.ics`
|
||||
- **datne** - private Flask app for on-disk file browsing through WebUI
|
||||
- **fuelkeeper** - private Django app
|
||||
- **books** - private Django app
|
@ -163,7 +163,7 @@ services:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "22:22"
|
||||
- "22:2222"
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
|
@ -1,9 +1,16 @@
|
||||
sudo apt update && \
|
||||
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common && \
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
|
||||
sudo apt update && \
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io && \
|
||||
sudo usermod -aG docker eriks && \
|
||||
sudo curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
if [[ ! $(id -u) -eq 0 ]]
|
||||
then
|
||||
sudo $@
|
||||
else
|
||||
apt update
|
||||
apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
||||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||
apt update
|
||||
apt install docker-ce docker-ce-cli containerd.io
|
||||
curl -L https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
|
||||
chmod +x /usr/local/bin/docker-compose
|
||||
fi
|
||||
|
Reference in New Issue
Block a user