Coder Social home page Coder Social logo

bertramray / railway-nginx-basic-auth Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 17 KB

This is for web applications running in railway.app which need a basic auth without modifing source code. You can add to railway easily by this button.

Dockerfile 27.48% Shell 72.52%
basic-auth docker nginx railway reverse-proxy

railway-nginx-basic-auth's Introduction

Basic Auth Nginx Reverse Proxy for Railway.app's Services

This is for web applications running in railway.app which need a basic auth without modifing source code. image

You can add to railway easily by this button.

Deploy on Railway

Usage

Step 1

Fork this repo, and deploy it in the same project which the services you want to add basic auth.

Step 2

Modify deployed service's enviroment variable. You should know that private network in railway is based on IPV6. So make sure your upstream applications have listened on an IPV6 port.

ENABLE_ALPINE_PRIVATE_NETWORKING

Most important one. You need this for alpine image's network. Just set it to ENABLE_ALPINE_PRIVATE_NETWORKING=true.

PROXY_PASS

The service's private network you want to be proxied. Now supports multiple values separated by commas.

Example: http://app-name.up.railway.app:3000,http://another-app-name.up.railway.app:3000

SERVER_NAME

The server name you want to use. Now supports multiple values separated by commas.

Example: server1.yourdomain.com,server2.yourdomain.com

PORT

The port expose to public. Default is 80. But someone said it's necessary for Railway.app detecting which port for nging.

USERNAME

Username for auth. Default is user.

PASSWORD

Password for auth. Default is password.

References

  1. Simple HTML App with NGNIX Docker container doesn't run on Railway.app - Application failed to respond (error-503)
  2. OpenSSL コマンドでサーバー上で直接 .htpasswd に ID & パスワードを追加する
  3. Workaround for Alpine-based images

railway-nginx-basic-auth's People

Contributors

bertramray avatar railway-bot avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.