Skip to content

Commit dbb9fe4

Browse files
committed
Nova Estrutura do Projeto
1 parent 4c2bac5 commit dbb9fe4

File tree

220 files changed

+149
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+149
-231
lines changed

.htaccess

-43
This file was deleted.

.htaccess.phpupgrader.4eced647

-43
This file was deleted.

.htaccess.phpupgrader.7d86709b

-41
This file was deleted.

.htaccess.phpupgrader.a07fe172

-43
This file was deleted.

.htaccess.phpupgrader.initial

-41
This file was deleted.

.user.ini

-15
This file was deleted.

Dockerfile

+27-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
1-
FROM php:7.4
2-
COPY ./ var/www/html
1+
FROM ubuntu:16.04
32

4-
RUN docker-php-ext-install pdo_mysql
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends --no-install-suggests nginx php php-fpm ca-certificates gettext && \
5+
rm -rf /var/lib/apt/lists/*
6+
7+
8+
# forward request and error logs to docker log collector
9+
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
10+
&& ln -sf /dev/stderr /var/log/nginx/error.log \
11+
&& ln -sf /dev/stderr /var/log/php7.0-fpm.log
12+
13+
RUN rm -f /etc/nginx/sites-enabled/*
14+
15+
COPY /etc/nginx.conf /tmp/nginx.conf
16+
COPY /etc/php-fpm.conf /tmp/php-fpm.conf
17+
18+
RUN mkdir -p /run/php && touch /run/php/php7.0-fpm.sock && touch /run/php/php7.0-fpm.pid
19+
20+
COPY /etc/entrypoint.sh /entrypoint.sh
21+
RUN chmod 755 /entrypoint.sh
522

6-
WORKDIR /var/www/html/painel
723
EXPOSE 80
8-
CMD ["php", "-S", "0.0.0.0:80"]
24+
25+
CMD ["/entrypoint.sh"]
26+
27+
RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests supervisor
28+
29+
COPY /src/. /var/www/html/
30+
COPY /etc/supervisor.conf /etc/supervisor/conf.d/supervisor.conf

etc/entrypoint.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
export NGINX_WEB_ROOT=${NGINX_WEB_ROOT:-'/var/www/html'}
4+
export NGINX_PHP_FALLBACK=${NGINX_PHP_FALLBACK:-'painel/index.php'}
5+
export NGINX_PHP_LOCATION=${NGINX_PHP_LOCATION:-'^/index\.php(/|$)'}
6+
export NGINX_USER=${NGINX_USER:-'www-data'}
7+
export NGINX_CONF=${NGINX_CONF:-'/etc/nginx/nginx.conf'}
8+
9+
export PHP_SOCK_FILE=${PHP_SOCK_FILE:-'/run/php.sock'}
10+
export PHP_USER=${PHP_USER:-'www-data'}
11+
export PHP_GROUP=${PHP_GROUP:-'www-data'}
12+
export PHP_MODE=${PHP_MODE:-'0660'}
13+
export PHP_FPM_CONF=${PHP_FPM_CONF:-'/etc/php/7.0/fpm/php-fpm.conf'}
14+
15+
envsubst '${NGINX_WEB_ROOT} ${NGINX_PHP_FALLBACK} ${NGINX_PHP_LOCATION} ${NGINX_USER} ${NGINX_CONF} ${PHP_SOCK_FILE} ${PHP_USER} ${PHP_GROUP} ${PHP_MODE} ${PHP_FPM_CONF}' < /tmp/nginx.conf.tpl > $NGINX_CONF
16+
envsubst '${NGINX_WEB_ROOT} ${NGINX_PHP_FALLBACK} ${NGINX_PHP_LOCATION} ${NGINX_USER} ${NGINX_CONF} ${PHP_SOCK_FILE} ${PHP_USER} ${PHP_GROUP} ${PHP_MODE} ${PHP_FPM_CONF}' < /tmp/php-fpm.conf.tpl > $PHP_FPM_CONF
17+
18+
/usr/bin/supervisord

etc/nginx.conf

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
user $NGINX_USER;
2+
worker_processes auto;
3+
pid /run/nginx.pid;
4+
5+
events {
6+
worker_connections 768;
7+
}
8+
9+
http {
10+
11+
sendfile on;
12+
tcp_nopush on;
13+
tcp_nodelay on;
14+
keepalive_timeout 65;
15+
types_hash_max_size 2048;
16+
17+
include /etc/nginx/mime.types;
18+
default_type application/octet-stream;
19+
20+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
21+
ssl_prefer_server_ciphers on;
22+
23+
access_log /var/log/nginx/access.log;
24+
error_log /var/log/nginx/error.log;
25+
26+
gzip on;
27+
gzip_disable "msie6";
28+
29+
include /etc/nginx/conf.d/*.conf;
30+
#include /etc/nginx/sites-enabled/*;
31+
32+
server {
33+
listen 80 default_server;
34+
root $NGINX_WEB_ROOT;
35+
36+
location / {
37+
try_files $uri $NGINX_PHP_FALLBACK$is_args$args;
38+
}
39+
location ~ $NGINX_PHP_LOCATION {
40+
fastcgi_pass unix:$PHP_SOCK_FILE;
41+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
42+
include fastcgi_params;
43+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
44+
fastcgi_param DOCUMENT_ROOT $realpath_root;
45+
46+
internal;
47+
}
48+
49+
# return 404 for all other php files not matching the front controller
50+
# this prevents access to other php files you don't want to be accessible.
51+
location ~ \.php$ {
52+
return 404;
53+
}
54+
}
55+
}

etc/php-fpm.conf

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[www]
2+
3+
pm = dynamic
4+
pm.max_children = 5
5+
pm.start_servers = 2
6+
pm.min_spare_servers = 1
7+
pm.max_spare_servers = 3
8+
clear_env = no
9+
10+
user = $PHP_USER
11+
group = $PHP_GROUP
12+
listen = $PHP_SOCK_FILE
13+
listen.owner = $PHP_USER
14+
listen.group = $PHP_GROUP
15+
listen.mode = $PHP_MODE

etc/supervisor.conf

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[supervisord]
2+
nodaemon=true
3+
4+
[program:nginx]
5+
command=nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
6+
process_name=%(program_name)s_%(process_num)02d
7+
numprocs=1
8+
autostart=true
9+
autorestart=false
10+
startsecs=0
11+
redirect_stderr=true
12+
stdout_logfile=/dev/stdout
13+
stdout_logfile_maxbytes=0
14+
15+
[program:php-fpm]
16+
command=php-fpm7.0 -R -F -c /etc/php/7.0/fpm/php-fpm.conf
17+
workdir=/var/www/html/
18+
process_name=%(program_name)s_%(process_num)02d
19+
numprocs=1
20+
autostart=true
21+
autorestart=false
22+
startsecs=0
23+
redirect_stderr=true
24+
stdout_logfile=/dev/stdout
25+
stdout_logfile_maxbytes=0
26+
27+
[eventlistener:subprocess-stopped]
28+
command=php /var/www/html/painel/index.php
29+
workdir=/var/www/html/
30+
process_name=%(program_name)s_%(process_num)02d
31+
numprocs=1
32+
events=PROCESS_STATE_EXITED,PROCESS_STATE_STOPPED,PROCESS_STATE_FATAL
33+
autostart=true
34+
autorestart=unexpected
File renamed without changes.
File renamed without changes.

Img/Pasta.svg src/Img/Pasta.svg

File renamed without changes.
File renamed without changes.
File renamed without changes.

Img/logo.png src/Img/logo.png

File renamed without changes.

Img/logo2.sgv src/Img/logo2.sgv

File renamed without changes.

Img/logo3.png src/Img/logo3.png

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

config.php src/config.php

File renamed without changes.

estilo/all.css src/estilo/all.css

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

js/jquery.js src/js/jquery.js

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)