skip to content »

mitbos.ru

Updating phusion passenger

updating phusion passenger-15

FROM phusion/passenger-full: # Set correct environment variables.

updating phusion passenger-14updating phusion passenger-56

Passenger-docker is part of a larger and more ambitious project: to make web app deployment ridiculously simple, to heights never achieved before.Phusion Passenger is an application server for Ruby and Python that can integrate into Apache and Nginx, or run standalone.It's currently one of the most popular application servers for Ruby.Passenger relieves you from even having to write a shell script, and adds all sorts of useful production features like process scaling, introspection, etc.These are not available when you're only using runit.You only have to write a small shell script which runs your daemon, and runit will keep it up and running for you, restarting it when it crashes, etc.

The shell script must be called ### In (make sure this file is chmod x): #! `setuser mecached xxx...` runs the given command # (`xxx...`) as the user `memcache`. exec /sbin/setuser memcache /usr/bin/memcached Note that the shell script must run the daemon without letting it daemonize/fork it.

You can add a virtual host entry (# /etc/nginx/sites-enabled/webapp.conf: server # Dockerfile: RUN rm /etc/nginx/sites-enabled/default ADD /etc/nginx/sites-enabled/RUN mkdir /home/app/webapp RUN ...commands to place your web app in /home/app/webapp...

# /etc/nginx/main.d/secret_key.conf: env SECRET_KEY=123456; # /etc/nginx/conf.d/gzip_max.conf: gzip_comp_level 9; # Dockerfile: ADD secret_/etc/nginx/main.d/secret_ADD gzip_/etc/nginx/conf.d/gzip_You can add additional daemons to the image by creating runit entries.

Relevant links: Github | Docker registry | Discussion forum | Twitter | Blog Passenger-docker is very lightweight on memory.

In its default configuration, it only uses 10 MB of memory (the memory consumed by bash, runit, syslog-ng, etc).

Usually, daemons provide a command line flag or a config file option for that.