{"id":28585979,"url":"https://github.com/phusion/passenger-docker-redhat","last_synced_at":"2025-09-13T21:34:20.846Z","repository":{"id":33835468,"uuid":"37535998","full_name":"phusion/passenger-docker-redhat","owner":"phusion","description":"Docker images for running Ruby, Python, Node.js and Meteor web apps with Passenger","archived":false,"fork":false,"pushed_at":"2015-06-19T17:08:49.000Z","size":160,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2023-04-09T13:16:09.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phusion.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-16T14:40:33.000Z","updated_at":"2022-01-31T09:16:03.000Z","dependencies_parsed_at":"2022-07-12T16:11:03.393Z","dependency_job_id":null,"html_url":"https://github.com/phusion/passenger-docker-redhat","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-docker-redhat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-docker-redhat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-docker-redhat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-docker-redhat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phusion","download_url":"https://codeload.github.com/phusion/passenger-docker-redhat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-docker-redhat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259211928,"owners_count":22822385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T06:12:40.709Z","updated_at":"2025-06-11T06:12:53.307Z","avatar_url":"https://github.com/phusion.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Red Hat docker images for running Ruby, Python, Node.js and Meteor web apps with Passenger\n\n\u003ccenter\u003e\u003cimg src=\"http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg\" width=\"196\" height=\"196\" alt=\"Phusion Passenger\"\u003e \u003cimg src=\"http://blog.phusion.nl/wp-content/uploads/2013/11/docker.png\" width=\"233\" height=\"196\" alt=\"Docker\"\u003e \u003cimg src=\"https://www.phusionpassenger.com/assets/pages/download/redhat-19aab036c29fd59acd176488db6304d3.png\" width=\"196\" height=\"196\" alt=\"Red Hat\"\u003e\u003c/center\u003e\n\nPassenger-docker-redhat is a set of [Docker](https://www.docker.com) images that provide a very easy way to run \n**Ruby, Python, Node.js and bundled Meteor** web apps using [Phusion Passenger](https://www.phusionpassenger.com/) (a fast, easy and reliable web application server).\n\nBy using passenger-docker-redhat as a base image, you can have your own web app docker container built \u0026 running with \na very minimal Dockerfile and a few lines of configuration.\n\nThis image contains a deployment of [Passenger with Nginx](https://www.phusionpassenger.com/library/indepth/integration_modes.html). It is built for those who prefer Red Hat inside the image, although it should run on docker-supported linux distributions like Ubuntu. If you do prefer something else, there is also an [Ubuntu-based image](https://github.com/phusion/passenger-docker).\n\n**Related links:**\n [Github](https://github.com/phusion/passenger-docker-redhat) |\n [Discussion forum](https://groups.google.com/d/forum/passenger-docker) |\n [Passenger docs](https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html) |\n [Twitter](https://twitter.com/phusion_nl) |\n [Blog](http://blog.phusion.nl/)\n \n## Using passenger-docker-redhat\n\n### Configuration\nThis example `Dockerfile` results in an image containing the `myapp` web app, reachable on port 80.\n\n```dockerfile\nFROM phusion/passenger-redhat-full:0.1\n\n# If you only need a certain language you can also use one of the slimmed down images instead:\n#FROM phusion/passenger-redhat-ruby:0.1\n#FROM phusion/passenger-redhat-nodejs:0.1\n#FROM phusion/passenger-redhat-python:0.1\n\nMAINTAINER You \u003cyou@example.com\u003e\n\nADD myapp/ /var/lib/nginx/myapp/\nADD myapp.conf /etc/nginx/conf.d/\n\nEXPOSE 80\n\n# Your app probably needs a command to install dependencies:\n# Ruby app:\n#RUN cd /var/lib/nginx/myapp; bundle\n# Node.js app:\n#RUN cd /var/lib/nginx/myapp; npm install\n# Python app, e.g. when using a framework like Flask:\n#RUN pip install flask\n```\nThe contents of `myapp.conf` (to activate Passenger for the web app):\n\n```nginx\nserver {\n\tlisten 80;\n\n\tpassenger_user nginx;\n\tpassenger_enabled on;\n\t\n\tpassenger_app_env production;\n\t\n\troot /var/lib/nginx/myapp/public;\n\n\tlocation / {\n\t}\n}\n```\n\n### Meteor: extra configuration\n\nPassenger-docker-redhat only supports Meteor apps that are bundled. In this mode the app runs as a Node.js app so you can use the `passenger-redhat-nodejs` image as the slimmed down base image. Some extra configuration is also needed:\n\nAdd to the `Dockerfile`:\n```dockerfile\n# Dependencies for bundled Meteor app \nRUN cd /var/lib/nginx/myapp/programs/server/; npm install\n\n# Extra config for allowing ROOT_URL\nADD meteor.conf /etc/nginx/main.d/\n```\n\nCreate `meteor.conf`:\n```nginx\n# Allow this environment variable to be passed using docker run -e ..\nenv ROOT_URL;\n```\n\nAdd to `myapp.conf`, within the `server { .. }` block:\n```nginx\n\t# Passenger only looks for app.js by default, but bundled Meteor apps have main.js.\n\tpassenger_app_type node;\n\tpassenger_startup_file main.js;\n```\n\n### Build \u0026 run\nWith the configuration done, you can build the image and run it:\n\n\tdocker build -t you/app:0.1 .\n\tdocker run -d --name=appcontainer you/app:0.1\n\nTo see your web app in action, you can find out where it is running:\n\n\tdocker inspect appcontainer | grep IPAddress\n\t  (output) \"IPAddress\": \"10.3.0.78\",\n\nAnd browse to that address: http://10.3.0.78/ \n\n## Troubleshooting\n\nHaving a look at the logs is usually very helpful:\n\n\t# For log inspection (use -f to keep following)\n\tdocker logs appcontainer\n\nAs long as the container is running, you can also exec commands on it, such as the following: \n\n\t# To see if passenger is running\n\tdocker exec -it appcontainer passenger-status\n\t\n\t# A console for looking around inside the running container\n\tdocker exec -it appcontainer bash -l\n\nA common issue is that Passenger does not recognize the webapp. Make sure you either have the file Passenger expects or [configure an alternative filename](https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#PassengerStartupFile):\n\nLanguage  | Expected file\n------------- | -------------\nRuby  | config.ru\nNode.js  | app.js\nMeteor | app.js (in this readme we configured it to main.js)\nPython | passenger_wsgi.py (e.g. containing `from app import MyApp as application`)\n\nIf the container doesn't start at all, you can have a look inside with bash (e.g. run `nginx` in the console to see if that throws an error):\n\n\t# Run a temporary container (changes will be lost) to peek inside\n\tdocker run --rm -it you/app:0.1 my_init --skip-runit -- bash -l\n\nFinally, there is a [discussion forum](https://groups.google.com/d/forum/passenger-docker) where others might be able to help you.\n\n## Advanced topics\n\n### Passenger / Nginx configuration\n\nThis image runs Passenger in combination with Nginx. Configuration files are included from two folders:\n- from `/etc/nginx/conf.d/`, into the http {} block (such as the example `myapp.conf` above)\n- from `/etc/nginx/main.d/`, into the top level (for example, to whitelist environment variables using `env ..;`)\n\nFor all configuration options, see the [Passenger/Nginx documentation](https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html).\n\nA special note about environment variables: Nginx [clears all environment variables](http://nginx.org/en/docs/ngx_core_module.html#env) except `TZ`. If you want to pass environment variables to your web app (e.g. using `docker run -e ..`), you need to whitelist them with a configuration file in `/etc/nginx/main.d/`.\n\nFor example, to whitelist `POSTGRES_PORT_5432_TCP_ADDR` you could add `/etc/nginx/main.d/postgres.conf` with the following content:\n\n\t# Whitelist environment variable so it reaches web app\n    env POSTGRES_PORT_5432_TCP_ADDR;\n\nThe image already whitelists `PATH` by default so that for example Node.js can be found by the Ruby ExecJs gem.\n\n### Development vs. production mode\n\nPassenger runs your web app in the mode that is specified by the `passenger_app_env` configuration setting (default value: production). The value is applied to the environment variables `RAILS_ENV`, `RACK_ENV`, `WSGI_ENV` and `NODE_ENV`, so that you can use the same Passenger option no matter which type of web app you use.\n\nNote that this also means that any value you put in those environment variables is overwritten by Passenger, so if you need to switch to development mode, use the `passenger_app_env` setting. Another way to do this on-the-fly is using `docker run -e PASSENGER_APP_ENV=development ..`, but then you need to delete the `passenger_app_env` setting from your configuration because it takes precedence.\n\n### Running startup scripts\n\nWhile starting, this image also executes any scripts (in lexographical order) from the following folder:\n- `/etc/my_init.d/`\n\nNote: the container will not start if any of the scripts returns a nonzero exit code.\n\nThis mechanism might be useful for tasks that are closely tied to your web app but cannot be run by the web app itself or split out to another docker container.\n\n### Maintenance upgrade \n\nFrom time to time we release new images with various upgrades, such as the Passenger version. If you don't want to be dependent on this timing, you can also automatically upgrade components while building your image. \n\nFor example, to always build with the latest Passenger, you can add to your `Dockerfile`:\n```docker\nRUN yum update -y\n```\n\n### Switching to Phusion Passenger Enterprise\n\nIf you are a [Phusion Passenger Enterprise](https://www.phusionpassenger.com/enterprise) customer, then you can switch to the Enterprise variant as follows.\n\n 1. Login to the [Customer Area](https://www.phusionpassenger.com/orders).\n 2. Download the license key and store it in the same directory as your Dockerfile.\n 3. Insert into your Dockerfile:\n\n```docker\nADD passenger-enterprise-license /etc/passenger-enterprise-license\nRUN echo deb https://download:$DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt trusty main \u003e /etc/apt/sources.list.d/passenger.list\nRUN apt-get update \u0026\u0026 apt-get install -y -o Dpkg::Options::=\"--force-confold\" passenger-enterprise nginx-extras\n```\nReplace `$DOWNLOAD_TOKEN` with your actual download token, as found in the Customer Area.\n\n[\u003cimg src=\"http://www.phusion.nl/assets/logo.png\"\u003e](http://www.phusion.nl/)\n\nThe image is maintained by [Phusion B.V.](http://www.phusion.nl/), we hope you enjoy using it :-)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphusion%2Fpassenger-docker-redhat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphusion%2Fpassenger-docker-redhat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphusion%2Fpassenger-docker-redhat/lists"}