more nginx configs
This commit is contained in:
parent
5924764aea
commit
1b59b2f104
14
README.md
14
README.md
|
|
@ -46,7 +46,6 @@ docker-compose exec --user www-data nextcloud php occ maintenance:repair
|
||||||
# this might make nginx time out, but that should be ok. It is still running scripts server side
|
# this might make nginx time out, but that should be ok. It is still running scripts server side
|
||||||
# set ROOT_URL in gitea/gitea/app.ini and restart container
|
# set ROOT_URL in gitea/gitea/app.ini and restart container
|
||||||
ROOT_URL = https://gitea.unboundedpress.org
|
ROOT_URL = https://gitea.unboundedpress.org
|
||||||
# TODO: change gitea to reroute to /mwinter
|
|
||||||
# migrate repose from github
|
# migrate repose from github
|
||||||
|
|
||||||
# UNBOUNDEDPRESS
|
# UNBOUNDEDPRESS
|
||||||
|
|
@ -57,8 +56,17 @@ mongorestore --host localhost --port 27017 -d unboundedpress -u username -p pass
|
||||||
# TODO: example of mongodb dump
|
# TODO: example of mongodb dump
|
||||||
# TODO: examples of the nextcloud and gitea dump and restore
|
# TODO: examples of the nextcloud and gitea dump and restore
|
||||||
# TODO: maybe try to add some kind of caching
|
# TODO: maybe try to add some kind of caching
|
||||||
# TODOL update the docker file
|
# TODO: update the docker file
|
||||||
|
# TODO: consider making mongodb a replica set
|
||||||
|
|
||||||
# SERVER MAINTANENCE
|
# SERVER MAINTANENCE
|
||||||
|
# update dynamic dns script and make cron
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
curl "https://api.1984.is/1.0/freedns/?apikey={{{KEY}}}&domain=unboundedpress.org&ip="
|
||||||
|
curl "https://api.1984.is/1.0/freedns/?apikey={{{KEY}}}&domain=www.unboundedpress.org&ip="
|
||||||
|
curl "https://api.1984.is/1.0/freedns/?apikey={{{KEY}}}&domain=restheart.unboundedpress.org&ip="
|
||||||
|
curl "https://api.1984.is/1.0/freedns/?apikey={{{KEY}}}&domain=gitea.unboundedpress.org&ip="
|
||||||
|
curl "https://api.1984.is/1.0/freedns/?apikey={{{KEY}}}&domain=nextcloud.unboundedpress.org&ip="
|
||||||
|
curl "https://api.1984.is/1.0/freedns/?apikey={{{KEY}}}&domain=dev.unboundedpress.org&ip="
|
||||||
# TODO: backup cron
|
# TODO: backup cron
|
||||||
# TODO: update dynamic dns cron
|
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,10 @@ services:
|
||||||
- unboundedpress
|
- unboundedpress
|
||||||
- restheart
|
- restheart
|
||||||
volumes:
|
volumes:
|
||||||
- ./../nginx/conf.d:/etc/nginx/conf.d
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
- ./../nginx/vhost.d:/etc/nginx/vhost.d
|
- ./nginx/vhost.d:/etc/nginx/vhost.d
|
||||||
- ./../nginx/html:/usr/share/nginx/html
|
- ./../nginx/html:/usr/share/nginx/html
|
||||||
- ./../nginx/certs:/etc/nginx/certs:ro
|
- ./../nginx/certs:/etc/nginx/certs:ro
|
||||||
- ./nginx/conf.d/uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
|
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
|
|
||||||
letsencrypt:
|
letsencrypt:
|
||||||
|
|
@ -33,10 +32,10 @@ services:
|
||||||
container_name: letsencrypt
|
container_name: letsencrypt
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./../nginx/conf.d:/etc/nginx/conf.d
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
- ./../nginx/certs:/etc/nginx/certs
|
- ./nginx/vhost.d:/etc/nginx/vhost.d
|
||||||
- ./../nginx/vhost.d:/etc/nginx/vhost.d
|
|
||||||
- ./../nginx/html:/usr/share/nginx/html
|
- ./../nginx/html:/usr/share/nginx/html
|
||||||
|
- ./../nginx/certs:/etc/nginx/certs:ro
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx-proxy
|
- nginx-proxy
|
||||||
|
|
@ -46,11 +45,10 @@ services:
|
||||||
container_name: restheart
|
container_name: restheart
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb
|
- mongodb
|
||||||
- unboundedpress
|
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_HOST=restheart.unboundedpress.org
|
- VIRTUAL_HOST=restheart.unboundedpress.org
|
||||||
- VIRTUAL_PORT=8080
|
- VIRTUAL_PORT=8080
|
||||||
- LETSENCRYPT_HOST=restheart.unboundedpress.org
|
- LETSENCRYPT_HOST=unboundedpress.org,www.unboundedpress.org,restheart.unboundedpress.org,gitea.unboundedpress.org,nextcloud.unboundedpress.org
|
||||||
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
|
|
@ -62,7 +60,7 @@ services:
|
||||||
image: mongo:3.6
|
image: mongo:3.6
|
||||||
container_name: mongo
|
container_name: mongo
|
||||||
environment:
|
environment:
|
||||||
MONGO_INITDB_ROOT_USERNAME: username
|
MONGO_INITDB_ROOT_USERNAME: mwinter
|
||||||
MONGO_INITDB_ROOT_PASSWORD: password
|
MONGO_INITDB_ROOT_PASSWORD: password
|
||||||
command: --bind_ip_all --auth
|
command: --bind_ip_all --auth
|
||||||
restart: always
|
restart: always
|
||||||
|
|
@ -82,12 +80,12 @@ services:
|
||||||
- DB_TYPE=mysql
|
- DB_TYPE=mysql
|
||||||
- DB_HOST=mariadb:3306
|
- DB_HOST=mariadb:3306
|
||||||
- DB_NAME=gitea
|
- DB_NAME=gitea
|
||||||
- DB_USER=username
|
- DB_USER=mwinter
|
||||||
- DB_PASSWD=password
|
- DB_PASSWD=password
|
||||||
- HTTP_PORT=4000
|
- HTTP_PORT=4000
|
||||||
- VIRTUAL_HOST=gitea.unboundedpress.org
|
- VIRTUAL_HOST=gitea.unboundedpress.org
|
||||||
- VIRTUAL_PORT=4000
|
- VIRTUAL_PORT=4000
|
||||||
- LETSENCRYPT_HOST=gitea.unboundedpress.org
|
- LETSENCRYPT_HOST=unboundedpress.org,www.unboundedpress.org,restheart.unboundedpress.org,gitea.unboundedpress.org,nextcloud.unboundedpress.org
|
||||||
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
||||||
- LFS_START_SERVER=true
|
- LFS_START_SERVER=true
|
||||||
- DISABLE_REGISTRATION=true
|
- DISABLE_REGISTRATION=true
|
||||||
|
|
@ -106,8 +104,6 @@ services:
|
||||||
image: mariadb:10.1.40
|
image: mariadb:10.1.40
|
||||||
container_name: mariadb
|
container_name: mariadb
|
||||||
restart: always
|
restart: always
|
||||||
#depends_on:
|
|
||||||
# - unboundedpress
|
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=password
|
- MYSQL_ROOT_PASSWORD=password
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -119,8 +115,8 @@ services:
|
||||||
build: .
|
build: .
|
||||||
container_name: unboundedpress
|
container_name: unboundedpress
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_HOST=www.unboundedpress.org
|
- VIRTUAL_HOST=www.unboundedpress.org,unboundedpress.org
|
||||||
- LETSENCRYPT_HOST=www.unboundedpress.org
|
- LETSENCRYPT_HOST=unboundedpress.org,www.unboundedpress.org,restheart.unboundedpress.org,gitea.unboundedpress.org,nextcloud.unboundedpress.org
|
||||||
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/usr/src/unboundedpress
|
- ./:/usr/src/unboundedpress
|
||||||
|
|
@ -129,6 +125,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb
|
- mongodb
|
||||||
|
- restheart
|
||||||
|
|
||||||
nextcloud:
|
nextcloud:
|
||||||
image: nextcloud:stable-apache
|
image: nextcloud:stable-apache
|
||||||
|
|
@ -138,15 +135,15 @@ services:
|
||||||
- ./../nextcloud:/var/www/html
|
- ./../nextcloud:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE=nextcloud
|
- MYSQL_DATABASE=nextcloud
|
||||||
- MYSQL_USER=username
|
- MYSQL_USER=mwinter
|
||||||
- MYSQL_PASSWORD=password
|
- MYSQL_PASSWORD=password
|
||||||
- MYSQL_HOST=mariadb
|
- MYSQL_HOST=mariadb
|
||||||
- NEXTCLOUD_ADMIN_USER=username
|
- NEXTCLOUD_ADMIN_USER=mwinter
|
||||||
- NEXTCLOUD_ADMIN_PASSWORD=password
|
- NEXTCLOUD_ADMIN_PASSWORD=password
|
||||||
- NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.unboundedpress.org
|
- NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.unboundedpress.org
|
||||||
- REDIS_HOST=redis
|
- REDIS_HOST=redis
|
||||||
- VIRTUAL_HOST=nextcloud.unboundedpress.org
|
- VIRTUAL_HOST=nextcloud.unboundedpress.org
|
||||||
- LETSENCRYPT_HOST=nextcloud.unboundedpress.org
|
- LETSENCRYPT_HOST=unboundedpress.org,www.unboundedpress.org,restheart.unboundedpress.org,gitea.unboundedpress.org,nextcloud.unboundedpress.org
|
||||||
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
- LETSENCRYPT_EMAIL=mwinter@unboundedpress.org
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
|
|
@ -182,5 +179,3 @@ services:
|
||||||
image: redis:5.0.5-alpine
|
image: redis:5.0.5-alpine
|
||||||
container_name: redis
|
container_name: redis
|
||||||
restart: always
|
restart: always
|
||||||
#volumes:
|
|
||||||
# - ./../nextcloud/redis:/data
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ server {
|
||||||
upstream gitea.unboundedpress.org {
|
upstream gitea.unboundedpress.org {
|
||||||
## Can be connected with "www_default" network
|
## Can be connected with "www_default" network
|
||||||
# gitea
|
# gitea
|
||||||
server 172.18.0.7:4000;
|
server 172.18.0.6:4000;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
server_name gitea.unboundedpress.org;
|
server_name gitea.unboundedpress.org;
|
||||||
|
|
@ -97,7 +97,7 @@ server {
|
||||||
upstream nextcloud.unboundedpress.org {
|
upstream nextcloud.unboundedpress.org {
|
||||||
## Can be connected with "www_default" network
|
## Can be connected with "www_default" network
|
||||||
# nextcloud
|
# nextcloud
|
||||||
server 172.18.0.9:80;
|
server 172.18.0.7:80;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
server_name nextcloud.unboundedpress.org;
|
server_name nextcloud.unboundedpress.org;
|
||||||
|
|
@ -130,7 +130,7 @@ server {
|
||||||
upstream restheart.unboundedpress.org {
|
upstream restheart.unboundedpress.org {
|
||||||
## Can be connected with "www_default" network
|
## Can be connected with "www_default" network
|
||||||
# restheart
|
# restheart
|
||||||
server 172.18.0.11:8080;
|
server 172.18.0.9:8080;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
server_name restheart.unboundedpress.org;
|
server_name restheart.unboundedpress.org;
|
||||||
|
|
@ -163,7 +163,7 @@ server {
|
||||||
upstream unboundedpress.org {
|
upstream unboundedpress.org {
|
||||||
## Can be connected with "www_default" network
|
## Can be connected with "www_default" network
|
||||||
# unboundedpress
|
# unboundedpress
|
||||||
server 172.18.0.6:3000;
|
server 172.18.0.10:3000;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
server_name unboundedpress.org;
|
server_name unboundedpress.org;
|
||||||
|
|
@ -196,7 +196,7 @@ server {
|
||||||
upstream www.unboundedpress.org {
|
upstream www.unboundedpress.org {
|
||||||
## Can be connected with "www_default" network
|
## Can be connected with "www_default" network
|
||||||
# unboundedpress
|
# unboundedpress
|
||||||
server 172.18.0.6:3000;
|
server 172.18.0.10:3000;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
server_name www.unboundedpress.org;
|
server_name www.unboundedpress.org;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue