Git Product home page Git Product logo

web's Introduction

Dockette / Web

๐Ÿณ Ready-to-use docker images for websites (nginx, PHP 7.0/7.1/7.2/7.3/7.4/8.0/8.1/8.2 + FPM, supervisor, cron).

๐Ÿ•น f3l1x.io | ๐Ÿ’ป f3l1x | ๐Ÿฆ @xf3l1x

Usage

Image Distro PHP
dockette/web:php-82 Buster 8.2
dockette/web:php-81 Buster 8.1
dockette/web:php-80 Buster 8.0
dockette/web:php-74 Buster 7.4
dockette/web:php-73 Buster 7.3
dockette/web:php-72 Buster 7.2
dockette/web:php-71 Buster 7.1
dockette/web:php-70 Buster 7.0

You can easily start your Docker container with following command.

docker run \
	-it \
	--rm \
	--name www \
	-p 80:80 \
	dockette/web:php-82

Custom Nginx config

To customize Nginx config just bind new config to the path /etc/nginx/sites.d/site.conf, for example, in such way:

docker run \
	-it \
	--rm \
	--name www \
	-v my-lovely-nginx.conf:/etc/nginx/sites.d/site.conf \
	-p 80:80 \
	dockette/web:php-82

Run cron tasks

You could also run cron tasks, just simply bind your crontab to /etc/cron.d/app, for example, in such way:

docker run \
	-it \
	--rm \
	--name www \
	-v my-crontab:/etc/cron.d/app \
	-p 80:80 \
	dockette/web:php-82

Please note, this crontab should has a little bit different format. There is also username, for example:

57 19 * * *   www-data    my_command

Development

See how to contribute to this package.

This package is currently maintaining by these authors.


Consider to support f3l1x. Also thank you for using this package.

web's People

Contributors

f3l1x avatar hrach avatar michalhlavka avatar nickspring avatar xsajto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.