Skip to content

Instantly share code, notes, and snippets.

@Lua12138
Created March 22, 2022 07:40
Show Gist options
  • Select an option

  • Save Lua12138/001e97f1098a78e667994fca84b6fd91 to your computer and use it in GitHub Desktop.

Select an option

Save Lua12138/001e97f1098a78e667994fca84b6fd91 to your computer and use it in GitHub Desktop.

Revisions

  1. Lua12138 created this gist Mar 22, 2022.
    27 changes: 27 additions & 0 deletions docker-compose.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    version: "3"

    services:
    nginx:
    image: nginx:1.21.6-alpine
    environment:
    - NGINX_ORDER_HOST=sample.com
    - NGINX_ORDER_BACKEND=http://sample:8080
    volumes:
    - "./nginx/templates:/etc/nginx/templates:ro"
    ports:
    - 80:80
    - 443:443

    # Sample of the template file.
    # the filename must be end of .conf.template
    #server {
    # listen 80;
    # server_name ${NGINX_ORDER_HOST};
    # location / {
    # proxy_pass ${NGINX_ORDER_BACKEND};
    # proxy_set_header X-Real-IP $remote_addr;
    # proxy_redirect off;
    # proxy_http_version 1.1;
    # proxy_buffering off;
    # }
    #}