From 6c244e3e68597f2b2ce38d5e27f1b8ff80f87633 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Sun, 19 Mar 2023 13:01:07 +0100 Subject: [PATCH] Update nginx containter Signed-off-by: Bensuperpc --- docker-compose.certbot.yml | 4 +++ docker-compose.flask.yml | 12 +++++++ docker-compose.nginx.yml | 3 +- docker-compose.volume.yml | 8 ----- docker-compose.wordpress.yml | 8 ++++- .../conf.d-cert}/jellyfin.conf | 0 .../conf.d-cert}/wordpress.conf | 0 {nginx-conf => nginx/conf.d}/flask_wsgi.conf | 0 {nginx-conf => nginx/conf.d}/jellyfin.conf | 0 {nginx-conf => nginx/conf.d}/minecraft.conf | 0 {nginx-conf => nginx/conf.d}/pgadmin.conf | 0 {nginx-conf => nginx/conf.d}/phpmyadmin.conf | 0 {nginx-conf => nginx/conf.d}/qbittorrent.conf | 0 .../conf.d}/sub/cache-fastcgi.conf | 0 .../conf.d}/sub/cache-proxy.conf | 0 .../conf.d}/sub/cache-uwsgi.conf | 0 {nginx-conf => nginx/conf.d}/sub/gzip.conf | 0 .../conf.d}/sub/options-ssl-nginx.conf | 0 {nginx-conf => nginx/conf.d}/test.conf | 0 {nginx-conf => nginx/conf.d}/wordpress.conf | 0 nginx/nginx.conf | 32 +++++++++++++++++++ 21 files changed, 57 insertions(+), 10 deletions(-) rename {nginx-conf-cert => nginx/conf.d-cert}/jellyfin.conf (100%) rename {nginx-conf-cert => nginx/conf.d-cert}/wordpress.conf (100%) rename {nginx-conf => nginx/conf.d}/flask_wsgi.conf (100%) rename {nginx-conf => nginx/conf.d}/jellyfin.conf (100%) rename {nginx-conf => nginx/conf.d}/minecraft.conf (100%) rename {nginx-conf => nginx/conf.d}/pgadmin.conf (100%) rename {nginx-conf => nginx/conf.d}/phpmyadmin.conf (100%) rename {nginx-conf => nginx/conf.d}/qbittorrent.conf (100%) rename {nginx-conf => nginx/conf.d}/sub/cache-fastcgi.conf (100%) rename {nginx-conf => nginx/conf.d}/sub/cache-proxy.conf (100%) rename {nginx-conf => nginx/conf.d}/sub/cache-uwsgi.conf (100%) rename {nginx-conf => nginx/conf.d}/sub/gzip.conf (100%) rename {nginx-conf => nginx/conf.d}/sub/options-ssl-nginx.conf (100%) rename {nginx-conf => nginx/conf.d}/test.conf (100%) rename {nginx-conf => nginx/conf.d}/wordpress.conf (100%) create mode 100644 nginx/nginx.conf diff --git a/docker-compose.certbot.yml b/docker-compose.certbot.yml index d333cd7..8650264 100644 --- a/docker-compose.certbot.yml +++ b/docker-compose.certbot.yml @@ -21,3 +21,7 @@ services: --webroot-path=/var/www/flask --domain bensuperpc.org --domain www.bensuperpc.org --webroot-path=/var/www/jellyfin --domain jellyfin.bensuperpc.org --domain www.jellyfin.bensuperpc.org --webroot-path=/var/www/wordpress --domain wordpress.bensuperpc.org --domain www.wordpress.bensuperpc.org + +volumes: + certbot-cert: + name: certbot-cert \ No newline at end of file diff --git a/docker-compose.flask.yml b/docker-compose.flask.yml index 2d6ddb9..836cd98 100644 --- a/docker-compose.flask.yml +++ b/docker-compose.flask.yml @@ -45,3 +45,15 @@ services: - flask_db networks: - app-network + +volumes: + postgres-data: + name: postgres-data + +# flask: +# name: flask +# driver: local +# driver_opts: +# type: bind +# device: ":./bensuperpc_website" +# o: bind diff --git a/docker-compose.nginx.yml b/docker-compose.nginx.yml index ecb4c32..ad03a3d 100644 --- a/docker-compose.nginx.yml +++ b/docker-compose.nginx.yml @@ -15,7 +15,8 @@ services: volumes: - wordpress:/var/www/wordpress - jellyfin:/var/www/jellyfin - - ./nginx-conf:/etc/nginx/conf.d + - ./nginx/conf.d:/etc/nginx/conf.d:ro + - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - certbot-cert:/etc/letsencrypt:ro networks: - app-network diff --git a/docker-compose.volume.yml b/docker-compose.volume.yml index a43eab1..5ece233 100644 --- a/docker-compose.volume.yml +++ b/docker-compose.volume.yml @@ -1,12 +1,6 @@ version: "3.9" volumes: - certbot-cert: - name: certbot-cert - wordpress: - name: wordpress - dbdata: - name: dbdata qbittorrent-downloads: name: qbittorrent-downloads qbittorrent-conf: @@ -19,5 +13,3 @@ volumes: name: jellyfin-movies jellyfin: name: jellyfin - postgres-data: - name: postgres-data diff --git a/docker-compose.wordpress.yml b/docker-compose.wordpress.yml index 5551b26..9e48996 100644 --- a/docker-compose.wordpress.yml +++ b/docker-compose.wordpress.yml @@ -53,4 +53,10 @@ services: depends_on: - wp_db networks: - - app-network \ No newline at end of file + - app-network + +volumes: + wordpress: + name: wordpress + dbdata: + name: dbdata \ No newline at end of file diff --git a/nginx-conf-cert/jellyfin.conf b/nginx/conf.d-cert/jellyfin.conf similarity index 100% rename from nginx-conf-cert/jellyfin.conf rename to nginx/conf.d-cert/jellyfin.conf diff --git a/nginx-conf-cert/wordpress.conf b/nginx/conf.d-cert/wordpress.conf similarity index 100% rename from nginx-conf-cert/wordpress.conf rename to nginx/conf.d-cert/wordpress.conf diff --git a/nginx-conf/flask_wsgi.conf b/nginx/conf.d/flask_wsgi.conf similarity index 100% rename from nginx-conf/flask_wsgi.conf rename to nginx/conf.d/flask_wsgi.conf diff --git a/nginx-conf/jellyfin.conf b/nginx/conf.d/jellyfin.conf similarity index 100% rename from nginx-conf/jellyfin.conf rename to nginx/conf.d/jellyfin.conf diff --git a/nginx-conf/minecraft.conf b/nginx/conf.d/minecraft.conf similarity index 100% rename from nginx-conf/minecraft.conf rename to nginx/conf.d/minecraft.conf diff --git a/nginx-conf/pgadmin.conf b/nginx/conf.d/pgadmin.conf similarity index 100% rename from nginx-conf/pgadmin.conf rename to nginx/conf.d/pgadmin.conf diff --git a/nginx-conf/phpmyadmin.conf b/nginx/conf.d/phpmyadmin.conf similarity index 100% rename from nginx-conf/phpmyadmin.conf rename to nginx/conf.d/phpmyadmin.conf diff --git a/nginx-conf/qbittorrent.conf b/nginx/conf.d/qbittorrent.conf similarity index 100% rename from nginx-conf/qbittorrent.conf rename to nginx/conf.d/qbittorrent.conf diff --git a/nginx-conf/sub/cache-fastcgi.conf b/nginx/conf.d/sub/cache-fastcgi.conf similarity index 100% rename from nginx-conf/sub/cache-fastcgi.conf rename to nginx/conf.d/sub/cache-fastcgi.conf diff --git a/nginx-conf/sub/cache-proxy.conf b/nginx/conf.d/sub/cache-proxy.conf similarity index 100% rename from nginx-conf/sub/cache-proxy.conf rename to nginx/conf.d/sub/cache-proxy.conf diff --git a/nginx-conf/sub/cache-uwsgi.conf b/nginx/conf.d/sub/cache-uwsgi.conf similarity index 100% rename from nginx-conf/sub/cache-uwsgi.conf rename to nginx/conf.d/sub/cache-uwsgi.conf diff --git a/nginx-conf/sub/gzip.conf b/nginx/conf.d/sub/gzip.conf similarity index 100% rename from nginx-conf/sub/gzip.conf rename to nginx/conf.d/sub/gzip.conf diff --git a/nginx-conf/sub/options-ssl-nginx.conf b/nginx/conf.d/sub/options-ssl-nginx.conf similarity index 100% rename from nginx-conf/sub/options-ssl-nginx.conf rename to nginx/conf.d/sub/options-ssl-nginx.conf diff --git a/nginx-conf/test.conf b/nginx/conf.d/test.conf similarity index 100% rename from nginx-conf/test.conf rename to nginx/conf.d/test.conf diff --git a/nginx-conf/wordpress.conf b/nginx/conf.d/wordpress.conf similarity index 100% rename from nginx-conf/wordpress.conf rename to nginx/conf.d/wordpress.conf diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..2703483 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,32 @@ + +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +}