env-docker/Config/ReverseProxy/docker-compose.yml
Chad f56b3da23d
Manage Script, Resource Limits, OnlyOffice Changes (#14)
* Create explicit file for cron, add two automations from fixes.

* Merge the OnlyOffice project into the Nextcloud project. Enhance comments and changelog. Make the container names consistent.

* Found the link. :)

* Add more variables.

* Add a TBD file for mail server.

* Create new script which will replace most the existing single purpose management scripts.

* Add limit to DNS so that if Internet goes out it does not max system resources.

* Prevent OnlyOffice from getting too hungry.

* Ensure Reverse Proxy always has at least some resources.

* Separate build. Add stats -s and combination option -A.

* Make script config file aware. Add comments.

* Add more comments.

* Fix comments.

* Further determine resource allocations.

* Also avoid checking for cron's call to the program.

* Add clean and log parameters. Some clean up.

* Update setups to have DIR first.

* Remove files taken over by manage script.

* Cleaning comments and output.
2023-09-01 05:50:29 -07:00

50 lines
1.5 KiB
YAML

# 2022-10-05 Hyperling
# Reverse Proxy with LetsEncrypt Certbot.
# This is a revised version of these works:
# https://phoenixnap.com/kb/docker-nginx-reverse-proxy
# https://www.docker.com/blog/how-to-use-the-official-nginx-docker-image/
# https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71
version: '3'
services:
app:
container_name: rp-app
build: ./
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ../../Volumes/ReverseProxy/letsencrypt:/etc/nginx/letsencrypt
- ../../Volumes/ReverseProxy/letsencrypt-certs:/etc/nginx/certs
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
deploy:
mode: global
resources:
limits:
cpus: '1.00'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
certbot:
container_name: rp-certbot
image: certbot/certbot
restart: always
volumes:
- ../../Volumes/ReverseProxy/letsencrypt:/etc/letsencrypt
- ../../Volumes/ReverseProxy/letsencrypt-certs:/etc/letsencrypt/nginx
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; cp -rL /etc/letsencrypt/live/* /etc/letsencrypt/nginx/; sleep 12h & wait $${!}; done;'"
deploy:
mode: global
resources:
limits:
cpus: '0.50'
memory: 256M
reservations:
cpus: '0.25'
memory: 128M