Fix Directory Hardcodes, Documentation Improvements (#10)
* Improve the main crontab example. * Remove /opt/Docker hardcodes. * Add periods. * Improve readability. * Begin removing hardcoded path from the bin files. * Update main README to no longer enforce hardcoded path. Other improvements. * Add the load folder with a README. * Add load folder and its README. * Improve reverse proxy text files. * Switch to tabs. * Update all scripts for tabs, DOCKER_HOME, and comments. * Let users know the directory choice is optional. * Fix environment file. * Add more details for the reverse proxy load balancing. * Don't actually listen for postgres. * Fix comments on source file. * Be more explicit on the pathing.
This commit is contained in:
@ -13,13 +13,15 @@ product's self-built solutions can be found below.
|
||||
git clone https://github.com/Hyperling/docker $PROJECT_DIR
|
||||
```
|
||||
|
||||
1. Add your Afraid DNS account key to $PROJECT_DIR/Config/DynamicDNS/private.key
|
||||
Account key can be found [here](https://freedns.afraid.org/dynamic/v2/).
|
||||
1. Add your user key to `$PROJECT_DIR/Config/DynamicDNS/private.key`. The key can
|
||||
be found on [this page](https://freedns.afraid.org/dynamic/v2/) after signing in.
|
||||
|
||||
1. Add this line to the system's cron scheduling using a command like `crontab -e`.
|
||||
The sleep waits anywhere from 0 to 55 minutes due to the
|
||||
[Random/10](https://tldp.org/LDP/abs/html/randomvar.html).
|
||||
|
||||
```
|
||||
5 * * * * $PROJECT_DIR/Config/DynamicDNS/update_dns.sh
|
||||
@hourly sleep $(( $RANDOM / 10 )); $PROJECT_DIR/Config/DynamicDNS/update_dns.sh
|
||||
```
|
||||
|
||||
### TESTING
|
||||
@ -61,6 +63,6 @@ and preferably add a 30-45 second sleep so that you do not hit near :00 seconds.
|
||||
|
||||
### No-IP.org Instructions
|
||||
|
||||
Please see this guide on installing the Dynamic Update Client (DUC).
|
||||
Please see the official guide on installing the Dynamic Update Client (DUC).
|
||||
|
||||
https://my.noip.com/dynamic-dns/duc
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Nextcloud configuration.
|
||||
# This is a revised version of the original work here:
|
||||
# This is a revised version of the original work here:
|
||||
# https://hub.docker.com/_/nextcloud
|
||||
|
||||
# Changelog:
|
||||
@ -13,7 +13,7 @@ services:
|
||||
restart: always
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
|
||||
volumes:
|
||||
- /opt/Docker/Volumes/Nextcloud/mariadb:/var/lib/mysql
|
||||
- ../../Volumes/Nextcloud/mariadb:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=ChangeMe
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
@ -28,11 +28,10 @@ services:
|
||||
links:
|
||||
- db
|
||||
volumes:
|
||||
- /opt/Docker/Volumes/Nextcloud/nextcloud:/var/www/html
|
||||
- ../../Volumes/Nextcloud/nextcloud:/var/www/html
|
||||
environment:
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=nc
|
||||
- MYSQL_PASSWORD=changeme
|
||||
- MYSQL_HOST=db
|
||||
- PHP_UPLOAD_LIMIT=5G
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
# Upstream Host Configuration
|
||||
For systems which do not resolve well such as ignoring `/etc/hosts`.
|
||||
|
||||
|
@ -5,4 +5,3 @@ upstream example-proxy-site {
|
||||
#server 127.0.0.1:8080;
|
||||
server hyperling.com;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
# HTML Sites
|
||||
If the reverse proxy also serves static HTML sites,
|
||||
the root directories of each can be placed here.
|
||||
Then in `../conf.d` add a file which points the domain to the HTML web root,
|
||||
such as `/etc/nginx/html/www.website.name`.
|
||||
An example for this exists called `html.example.com`.
|
||||
It should be fairly easy to recreate for another website.
|
||||
If the reverse proxy also serves static HTML sites, the root directories of each
|
||||
can be placed here. Then in `../conf.d` add a file which points the domain to
|
||||
the HTML web root, such as `/etc/nginx/html/www.website.name`. An example for
|
||||
this exists called `html.example.com`. It should be fairly easy to recreate for
|
||||
another website.
|
||||
|
8
Config/ReverseProxy/config/load.conf.d/README.md
Normal file
8
Config/ReverseProxy/config/load.conf.d/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Load Balancing Files
|
||||
Allow requests coming to this server to be spread amongst multiple servers based
|
||||
on port number. It does not seem possible to spread them based on `server_name`
|
||||
or other directives like a reverse proxy. The server simply listens on the port
|
||||
then runs through the upstream list to determine the destination.
|
||||
|
||||
## Official Documentation
|
||||
http://nginx.org/en/docs/stream/ngx_stream_core_module.html
|
15
Config/ReverseProxy/config/load.conf.d/example.com
Normal file
15
Config/ReverseProxy/config/load.conf.d/example.com
Normal file
@ -0,0 +1,15 @@
|
||||
# Example of how to load balance 4 Postgres servers for example.com. Since this
|
||||
# does not act under a reverse proxy situation, code is commented so that the
|
||||
# container does not needlessly start listening on the port.
|
||||
|
||||
#upstream postgres_servers {
|
||||
# server 1.2.3.1:5432;
|
||||
# server 1.2.3.2:5432;
|
||||
# server 1.2.3.3:5432;
|
||||
# server 1.2.3.4:5432;
|
||||
#}
|
||||
#
|
||||
#server {
|
||||
# listen 5432;
|
||||
# proxy_pass postgres_servers;
|
||||
#}
|
@ -66,12 +66,17 @@ http {
|
||||
include /etc/nginx/conf.d/*;
|
||||
}
|
||||
|
||||
# TBD, going live with HTTP first.
|
||||
## TBD.
|
||||
mail {
|
||||
## Reverse Proxied Mail Server Configurations ##
|
||||
#include /etc/nginx/mail.conf.d/*;
|
||||
}
|
||||
|
||||
## Under Experimentation
|
||||
# So far does not seem like server_name works, only listen, so not useful as a
|
||||
# reverse proxy. Such as 2 Postgres servers needing traffic from different
|
||||
# domains, or two SMTP servers on the same IP serving two different domains.
|
||||
# Those possibilities do not seem to exist here, unfortunately.
|
||||
stream {
|
||||
## Service Forwarding and Load Balancing ##
|
||||
# If this supports the `listen` and `server_name` directives then this may
|
||||
|
Reference in New Issue
Block a user