Current Mac Files

This commit is contained in:
2024-11-26 14:37:36 -03:00
parent 6df5ccdf73
commit cfbca92b59
31 changed files with 1023 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
version: "3"
services:
db:
image: mysql:latest
container_name: laravel-blog-db
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_ROOT_PASSWORD: test
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
#- /Volumes/HDD_MINI/dev_docker/docker_lamp_5_6_39/scriptsdb:/docker-entrypoint-initdb.d
- /Volumes/HDD_MINI/dev_docker/docker_laravel/databases/blog:/var/lib/mysql
user: mysql
networks:
- laravel-blog-stack
php-blog:
depends_on:
- db
build:
context: ./docker-file-php
dockerfile: Dockerfile
container_name: laravel-blog-php
volumes:
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/blog/:/var/www/html"
#ports:
# - 9080:80
# - 9081:443
networks:
- laravel-blog-stack
nginx-blog:
build:
context: ./docker-file-nginx
dockerfile: Dockerfile
container_name: laravel-blog-nginx
ports:
- 9083:80
depends_on:
- php-blog
volumes:
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/blog/:/var/www/html"
networks:
- laravel-blog-stack
phpmyadmin:
depends_on:
- db
image: phpmyadmin:apache
container_name: laravel-blog-myadmin
ports:
- 9082:80
environment:
- PMA_HOST=db
- PMA_PORT=3306
- UPLOAD_LIMIT=500M
- MEMORY_LIMIT=5000M
- MAX_EXECUTION_TIME=0
networks:
- laravel-blog-stack
networks:
laravel-blog-stack:
driver: bridge

View File

@@ -0,0 +1,4 @@
FROM nginx
RUN apt update
RUN apt install -y vim
COPY conf/default.conf /etc/nginx/conf.d

View File

@@ -0,0 +1,31 @@
server {
listen 80 default_server;
server_name localhost;
root /var/www/html/public;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
index index.html index.php;
client_max_body_size 5M;
location / {
try_files $uri $uri /index.php$is_args$args;
}
location ~ ^/.+\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_pass php-blog:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param REALPATHTEST $realpath_root;
internal;
}
}

View File

@@ -0,0 +1,5 @@
zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.start_with_request=yes
xdebug.discover_client_host=0
xdebug.client_host=host.docker.internal

View File

@@ -0,0 +1,19 @@
FROM php:8.3.1-fpm-alpine
#Referencia solucion https://github.com/caohoangtu/docker-laravel/tree/master
RUN apk add --update --no-cache autoconf g++ make openssl-dev
RUN apk add libpng-dev
RUN apk add libzip-dev
RUN apk add --update linux-headers
RUN docker-php-ext-install gd
RUN docker-php-ext-install zip
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install sockets
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
#install xdebug
RUN pecl install xdebug
COPY 90-xdebug.ini "${PHP_INI_DIR}"/conf.d