lucas cardoso
2 years ago
6 changed files with 36 additions and 14 deletions
@ -1,27 +1,31 @@ |
|||||||
FROM php:8.1.7-apache |
FROM php:8.1.7-apache |
||||||
|
|
||||||
### Install surpervisor ### |
|
||||||
RUN apt-get update -y |
RUN apt-get update -y |
||||||
RUN apt-get install -y supervisor unzip git vim |
RUN apt-get install -y supervisor unzip vim |
||||||
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql |
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql |
||||||
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php |
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php |
||||||
RUN HASH=`curl -sS https://composer.github.io/installer.sig` |
RUN HASH=`curl -sS https://composer.github.io/installer.sig` |
||||||
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer |
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer |
||||||
|
RUN mkdir /var/www/public |
||||||
|
#config supervisord |
||||||
RUN mkdir -p /var/www/html/ /var/log/supervisor |
RUN mkdir -p /var/www/html/ /var/log/supervisor |
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf |
COPY supervisord.conf /etc/supervisor/supervisord.conf |
||||||
COPY apache2.conf /etc/apache2/apache2.conf |
#config apache |
||||||
COPY .htaccess /var/www/ |
COPY apache/apache2.conf /etc/apache2/apache2.conf |
||||||
|
COPY apache/revers_proxy.conf /etc/apache2/conf-available/revers_proxy.conf |
||||||
|
COPY apache/.htaccess /var/www/public/ |
||||||
|
COPY apache/.htaccess_public /var/www/ |
||||||
|
RUN a2enconf revers_proxy |
||||||
RUN a2enmod rewrite |
RUN a2enmod rewrite |
||||||
RUN a2enmod actions |
RUN a2enmod actions |
||||||
## CONFIGURANDO AMBIENTE WEB ## |
RUN a2enmod proxy proxy_http |
||||||
|
#config composer |
||||||
WORKDIR /var/www/public |
WORKDIR /var/www/public |
||||||
RUN git config --global user.email "desenvolvimento@simplesip.com.br" |
|
||||||
RUN git config --global user.name "Desenvolvimento" |
|
||||||
COPY . /var/www/public |
COPY . /var/www/public |
||||||
RUN rm -rf composer.lock |
RUN rm -rf composer.lock |
||||||
RUN rm -rf vendor |
RUN rm -rf vendor |
||||||
RUN composer install |
RUN composer install |
||||||
EXPOSE 80 |
EXPOSE 80 |
||||||
|
|
||||||
#CMD supervisord -n -c /etc/supervisor/supervisord.conf |
CMD supervisord -n -c /etc/supervisor/supervisord.conf |
||||||
#CMD [ "/usr/sbin/httpd", "-D", "FOREGROUND" ] |
#CMD [ "/usr/sbin/httpd", "-D", "FOREGROUND" ] |
@ -0,0 +1,3 @@ |
|||||||
|
RewriteEngine on |
||||||
|
RewriteRule ^$ public/ [L] |
||||||
|
RewriteRule (.*) public/$1 [L] |
@ -0,0 +1,17 @@ |
|||||||
|
<IfModule mod_proxy.c> |
||||||
|
ProxyRequests On |
||||||
|
|
||||||
|
<Proxy *> |
||||||
|
Require all granted |
||||||
|
</Proxy> |
||||||
|
|
||||||
|
ProxyVia On |
||||||
|
|
||||||
|
<IfModule mod_disk_cache.c> |
||||||
|
CacheEnable disk / |
||||||
|
CacheRoot "/var/cache/mod_proxy" |
||||||
|
</IfModule> |
||||||
|
ProxyPass /wss ws://127.0.0.1:8080/ws |
||||||
|
ProxyPassReverse /wss wss://127.0.0.1:8080/ws |
||||||
|
</IfModule> |
||||||
|
|
@ -1,13 +1,11 @@ |
|||||||
[supervisord] |
[supervisord] |
||||||
nodaemon=true |
nodaemon=true |
||||||
user=root |
|
||||||
|
|
||||||
[program:apache2] |
[program:apache2] |
||||||
command=service apache2 start |
command=apache2-foreground |
||||||
redirect_stderr=true |
|
||||||
|
|
||||||
[program:test_services] |
[program:test_services] |
||||||
command=php /var/www/tests/test_services.php |
command=php /var/www/public/tests/test_services.php |
||||||
|
|
||||||
[program:websocket] |
[program:websocket] |
||||||
command=php /var/www/websocket/websocket.php |
command=php /var/www/public/websocket/websocket.php |
Loading…
Reference in new issue