diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e917da4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +FROM nginxproxy/nginx-proxy:1.6 + +# Create a directory within the container to hold your custom configuration +RUN mkdir -p /etc/nginx/custom + +# Copy your external configuration file into the container +COPY your_config_file.conf /etc/nginx/custom/ + +# Optionally, you might need to adjust the Nginx configuration to include your custom file. +# This depends on how you want to integrate your configuration. +# One common approach is to include it in the main nginx.conf. + +# Example: Include your custom config in the default server block configuration +# RUN echo "include /etc/nginx/custom/your_config_file.conf;" >> /etc/nginx/conf.d/default.conf + +# Alternatively, you might want to create a separate server block configuration. +# RUN cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.orig +# RUN echo "server {" >> /etc/nginx/conf.d/my_custom_server.conf +# RUN cat /etc/nginx/custom/your_config_file.conf >> /etc/nginx/conf.d/my_custom_server.conf +# RUN echo "}" >> /etc/nginx/conf.d/my_custom_server.conf + +# You might need to restart or reload Nginx for the changes to take effect. +# However, since this is the base image's entrypoint, any changes here might be overwritten. +# It's generally better to manage configuration through environment variables or volume mounts +# if possible with nginx-proxy. + +# If you absolutely need to restart Nginx, you might consider a custom entrypoint script. +# For example: +# COPY entrypoint.sh /usr/local/bin/ +# RUN chmod +x /usr/local/bin/entrypoint.sh +# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +# +# And in your entrypoint.sh: +# #!/bin/sh +# +# # Apply your custom configuration (if not already done above) +# # ... +# +# # Start the original nginx-proxy entrypoint +# /app/docker-entrypoint.sh "$@" diff --git a/compose.bash b/compose.bash new file mode 100755 index 0000000..b1c7bd0 --- /dev/null +++ b/compose.bash @@ -0,0 +1,19 @@ +#!/bin/bash + +## + +reset + +clear + +## + +set -e + +set -x + +## + +docker compose down --remove-orphans + +docker compose up --build -d diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..97184e8 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,38 @@ +services: + docker-http-proxy: + + container_name: docker-http-proxy + + image: jacqueskingram/docker-http-proxy + + build: + + context: . + + dockerfile: Dockerfile + + restart: unless-stopped + + ports: + + - 80:80 + + - 443:443 + + volumes: + + - /var/run/docker.sock:/tmp/docker.sock:ro + + - /var/docker/nginx/html:/usr/share/nginx/html + + - /var/docker/nginx/certs:/etc/nginx/certs + + - /var/docker/nginx/vhost:/etc/nginx/vhost.d + + logging: + + options: + + max-size: "10m" + + max-file: "3" diff --git a/your_config_file.conf b/your_config_file.conf new file mode 100644 index 0000000..4f8cd91 --- /dev/null +++ b/your_config_file.conf @@ -0,0 +1 @@ +# bullshit for right now