Sign inSign up

maynedev/http_server

By maynedev

Updated over 6 years ago

Image
0

744

maynedev/http_server repository overview

FROM ubuntu:latest RUN apt-get update RUN apt-get install -y software-properties-common RUN add-apt-repository ppa:ondrej/php

ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN true

preesed tzdata, update package index, upgrade packages and install needed software

RUN echo "tzdata tzdata/Areas select Europe" > /tmp/preseed.txt;
echo "tzdata tzdata/Zones/Europe select Berlin" >> /tmp/preseed.txt;
debconf-set-selections /tmp/preseed.txt RUN apt-get install -y git zip unzip curl nginx php7.4 php7.4-common php7.4-opcache php7.4-cli php7.4-gd php7.4-curl php7.4-mysql php7.4-fpm php7.4-mbstring php7.4-xml RUN apt-get install -y supervisor RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN mkdir -p /var/log/supervisor RUN mkdir -p /run/php/ COPY ci_cd/supervisord.conf /etc/supervisor/conf.d/supervisord.conf ADD ci_cd/default /etc/nginx/sites-available/ ADD ci_cd/nginx.conf /etc/nginx/

EXPOSE 80 CMD ["/usr/bin/supervisord"]

ci_cd/supervisord.conf


[supervisord] nodaemon=true

[program:php7.3-fpm] command=/usr/sbin/php-fpm7.3 -F stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 autorestart=true startretries=0

[program:nginx] command=/usr/sbin/nginx -g "daemon off;" stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 autorestart=true startretries=0

nginx.cong

user 'www-data'; worker_processes auto; pid /run/nginx.pid;

events { worker_connections 1024; # multi_accept on; }

http { include /etc/nginx/mime.types; default_type application/octet-stream;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

gzip on;
gzip_disable "msie6";
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;

gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

}

default

server { server_name _; listen 80; index index.php index.html; root /var/www/html/public;

   location / {
                try_files $uri $uri/ /index.php?$query_string;
        }

        location ~ \.php$ {
            include snippets/fastcgi-php.conf;
                            fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        }

        location ~ /\.ht {
                deny all;
        }

        location ~ /.well-known {
                allow all;
        }

}

Tag summary

Content type

Image

Digest

Size

136.1 MB

Last updated

over 6 years ago

docker pull maynedev/http_server