Git Product home page Git Product logo

web's Issues

Nginx - example of php site

##
# Virtual Host Configs
##
upstream app {
    server unix:/var/run/php71-fpm.sock;
}

server {
  listen 80;

  index index.html index.php;
  root /srv/www;

  location / {
    try_files $uri $uri/ /index.php$is_args$args;
  }

  location ~* \.php$ {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;

    fastcgi_pass   app;
    fastcgi_index  index.php;
    include        fastcgi_params;

    fastcgi_param  PATH_INFO $fastcgi_path_info;
    fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_path_info;
    fastcgi_param  SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    fastcgi_param  DOCUMENT_ROOT $realpath_root;

    try_files $uri =404;
  }
}

Supervisor in Go instead of Python

Hi!

I suggest replacing the standard supervisord from packages (I am talking about Alpine) with single binary written in Go from https://hub.docker.com/r/ochinchina/supervisord

The benefit of this change is that we will get rid of some overhead from Python environment which supervisor brings. So the image is overall smaller.

We need to add/change this in Dockerfile:

# ...
COPY --from=ochinchina/supervisord:latest /usr/local/bin/supervisord /usr/local/bin/supervisord
#...
CMD [ "/usr/local/bin/supervisord", "-c", "supervisor.conf", "-d" ]

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.