Skip to content

[ Question ] Reverse proxy domain path to cloud function or AWS Lambda service? #372

@Borillion

Description

@Borillion

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.yml file to cause the proper configuration to be generated by nginx.tmpl but things get weird, docker requires each service to have an image.

Is there best practice method to work around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions