custom image

This commit is contained in:
Didier Slof 2023-01-31 12:36:37 +01:00
parent 2cd272215d
commit 40d013df56
Signed by: didier
GPG key ID: 01E71F18AA4398E5
5 changed files with 53 additions and 4 deletions

View file

@ -0,0 +1,4 @@
FROM nginxproxy/nginx-proxy:latest
COPY config/vhost.d/* /etc/nginx/vhost.d/
COPY config/nginx.conf /etc/nginx/nginx.conf

View file

@ -0,0 +1,34 @@
# default config
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 10240;
}
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;
}
daemon off;

View file

@ -0,0 +1,10 @@
## Start of configuration add by letsencrypt container
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
auth_request off;
allow all;
root /usr/share/nginx/html;
try_files $uri =404;
break;
}
## End of configuration add by letsencrypt container

View file

@ -0,0 +1,3 @@
location /nginx {
return 200 "Nginx is running!";
}

View file

@ -7,18 +7,16 @@ networks:
services: services:
proxy: proxy:
build:
context:
container_name: proxy container_name: proxy
restart: always restart: always
image: nginxproxy/nginx-proxy:latest
privileged: true privileged: true
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
volumes: volumes:
- /srv/.webcerts:/etc/nginx/certs:rw - /srv/.webcerts:/etc/nginx/certs:rw
- /srv/proxy/other/vhost.d:/etc/nginx/vhost.d
- /srv/proxy/data/html:/usr/share/nginx/html
- /srv/proxy/config/nginx.conf:/etc/nginx/nginx.conf
- /var/run/docker.sock:/tmp/docker.sock - /var/run/docker.sock:/tmp/docker.sock
labels: labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true