I am using https://github.com/evertramos/nginx-proxy-automation/ and it has as a component https://github.com/nginx-proxy/docker-gen.
I would like to proxy a location on my host
https://someurl.com/consumer -> https://project_id.cloudfunctions.net
In a non-docker setup I would write something like so in a someurl_com.conf file:
server {
listen 443 ssl;
server_name someurl'.com;
ssl_certificate /path/to/certificate;
ssl_certificate_key /path/to/key;
location /consumer {
proxy_pass https://project_id.cloudfunctions.net/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
underscores_in_headers on;
proxy_set_header proxy_ssl_server_name $host;
}
}
I am trying to figure out what I would put in the compose-override.yml file to cause the proper configuration to be generated by nginx-proxy-automation-gen's nginx.tmpl but not have it interfere with other proxied sites.
services:
nginx-proxy-automation-cfproject_id:
environment:
VIRTUAL_HOST: "someurl.com"
VIRTUAL_PORT: "443"
However, docker requires an image and this where things get weird, docker requires each service to have an image. At first my thought was to attach a generic alpine container, but it seems like wasteful and insecure way to go about this.
Is there best practice method to work around this?