4 changed files with 98 additions and 0 deletions
@ -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 "$@" |
@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
## |
||||
|
||||
reset |
||||
|
||||
clear |
||||
|
||||
## |
||||
|
||||
set -e |
||||
|
||||
set -x |
||||
|
||||
## |
||||
|
||||
docker compose down --remove-orphans |
||||
|
||||
docker compose up --build -d |
@ -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" |
Loading…
Reference in new issue