diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7470a2b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "docker" + directory: "/docker" + schedule: + interval: "weekly" diff --git a/README.md b/README.md index 1d70bb2..3334062 100644 --- a/README.md +++ b/README.md @@ -17,5 +17,6 @@ If you've previously run a proxy, please update to the most recent version by pu ```shell git pull docker-compose down +docker-compose build docker-compose up --detach ``` diff --git a/docker-compose.yml b/docker-compose.yml index 828ef3d..def3a47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,22 +2,22 @@ version: '3' services: nginx-terminate: - build: ./nginx-terminate/ + build: ./docker-nginx restart: unless-stopped volumes: - - ./data/nginx-terminate:/etc/nginx/conf.d + - ./data/nginx-terminate:/usr/conf.d - ./data/certbot/conf:/etc/letsencrypt - ./data/certbot/www:/var/www/certbot ports: - "443:443" - "80:80" - command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /opt/nginx/sbin/nginx -s reload; done & /opt/nginx/sbin/nginx -c /etc/nginx/conf.d/nginx.conf -g \"daemon off;\"'" + command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /usr/sbin/nginx -s reload; done & /usr/sbin/nginx -c /usr/conf.d/nginx.conf -g \"daemon off;\"'" nginx-relay: - build: ./nginx-relay/ + build: ./docker-nginx restart: unless-stopped volumes: - - ./data/nginx-relay:/etc/nginx/conf.d - command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /opt/nginx/sbin/nginx -s reload; done & /opt/nginx/sbin/nginx -c /etc/nginx/conf.d/nginx.conf -g \"daemon off;\"'" + - ./data/nginx-relay:/usr/conf.d + command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /usr/sbin/nginx -s reload; done & /usr/sbin/nginx -c /usr/conf.d/nginx.conf -g \"daemon off;\"'" certbot: image: certbot/certbot restart: unless-stopped diff --git a/docker-nginx/Dockerfile b/docker-nginx/Dockerfile new file mode 100644 index 0000000..ce1da4d --- /dev/null +++ b/docker-nginx/Dockerfile @@ -0,0 +1,4 @@ +# This wraps the upstream nginx image so dependabot can watch it for changes. +# If https://github.com/dependabot/dependabot-core/issues/390 is addressed, we +# can just inline this into docker-compose.yml +FROM nginx:1.26.1-alpine diff --git a/nginx-relay/Dockerfile b/nginx-relay/Dockerfile deleted file mode 100644 index 1900884..0000000 --- a/nginx-relay/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM ubuntu:20.04 - -RUN apt-get update && apt-get -y upgrade && \ - apt-get install -y wget libpcre3-dev build-essential libssl-dev zlib1g-dev && \ - rm -rf /var/lib/apt/lists/* - -WORKDIR /opt - -RUN wget https://nginx.org/download/nginx-1.18.0.tar.gz && \ - tar -zxvf nginx-1.*.tar.gz && \ - cd nginx-1.* && \ - ./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module --with-ipv6 --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module && \ - make && make install && \ - cd .. && rm -rf nginx-1.* - -RUN adduser --system --no-create-home --disabled-login --disabled-password --group nginx - -WORKDIR / - -EXPOSE 443 - -CMD ["/opt/nginx/sbin/nginx", "-c", "/etc/nginx/conf.d/nginx.conf", "-g", "daemon off;"] diff --git a/nginx-terminate/Dockerfile b/nginx-terminate/Dockerfile deleted file mode 100644 index 1900884..0000000 --- a/nginx-terminate/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM ubuntu:20.04 - -RUN apt-get update && apt-get -y upgrade && \ - apt-get install -y wget libpcre3-dev build-essential libssl-dev zlib1g-dev && \ - rm -rf /var/lib/apt/lists/* - -WORKDIR /opt - -RUN wget https://nginx.org/download/nginx-1.18.0.tar.gz && \ - tar -zxvf nginx-1.*.tar.gz && \ - cd nginx-1.* && \ - ./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module --with-ipv6 --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module && \ - make && make install && \ - cd .. && rm -rf nginx-1.* - -RUN adduser --system --no-create-home --disabled-login --disabled-password --group nginx - -WORKDIR / - -EXPOSE 443 - -CMD ["/opt/nginx/sbin/nginx", "-c", "/etc/nginx/conf.d/nginx.conf", "-g", "daemon off;"]