+ laravel nginx config, php84
This commit is contained in:
22
bash/pm2-logs.sh
Executable file
22
bash/pm2-logs.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||
|
||||
. $DIR/bash/_docker-cmd.sh || {
|
||||
echo "no docker cmd is presented" && exit 1
|
||||
}
|
||||
|
||||
PM2_SERVICE=$1
|
||||
|
||||
if [[ -z "${PM2_SERVICE}" ]]; then
|
||||
echo "Usage: $(basename $0) NODEJS_PROJECT_NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONTAINER=$(docker ps | grep "pm2-${PM2_SERVICE}" | awk '{print $1}')
|
||||
|
||||
if [[ -z "${CONTAINER}" ]]; then
|
||||
echo "Unable to find container: db"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$DOCKER_CMD logs --follow ${CONTAINER}
|
2
bash/show-python-log.sh
Executable file
2
bash/show-python-log.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker logs --follow $(docker ps | grep "python-${1}" | awk '{print $1}')
|
9
config/nginx/includes.d/laravel.conf
Normal file
9
config/nginx/includes.d/laravel.conf
Normal file
@ -0,0 +1,9 @@
|
||||
location / {
|
||||
rewrite ^/.*$ /index.php last;
|
||||
}
|
||||
|
||||
# Whitelist
|
||||
location = /favicon.ico { try_files $uri /index.php; }
|
||||
location ~ ^/.*\.xml { try_files $uri /index.php; }
|
||||
location = /robots.txt { try_files $uri /index.php; }
|
||||
location = /humans.txt { try_files $uri /index.php; }
|
@ -1,4 +1,11 @@
|
||||
location / {
|
||||
if ($request_method = '_OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization';
|
||||
return 204;
|
||||
}
|
||||
|
||||
rewrite ^/.*$ /index.php last;
|
||||
}
|
||||
location ~ ^/combine.*\.(css|js) {
|
||||
|
@ -92,7 +92,7 @@ services:
|
||||
- 2500
|
||||
redis:
|
||||
image: redis
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
|
||||
volumes:
|
||||
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||
@ -118,6 +118,6 @@ services:
|
||||
pm2:
|
||||
build:
|
||||
context: ./dockerfiles/pm2
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- 3000
|
||||
|
@ -34,6 +34,12 @@ services:
|
||||
service: php
|
||||
build:
|
||||
dockerfile: php83.Dockerfile
|
||||
php84:
|
||||
extends:
|
||||
file: docker-compose.base.yml
|
||||
service: php
|
||||
build:
|
||||
dockerfile: php84.Dockerfile
|
||||
workspace74:
|
||||
extends:
|
||||
file: docker-compose.base.yml
|
||||
@ -58,6 +64,12 @@ services:
|
||||
service: workspace
|
||||
build:
|
||||
dockerfile: workspace83.Dockerfile
|
||||
workspace84:
|
||||
extends:
|
||||
file: docker-compose.base.yml
|
||||
service: workspace
|
||||
build:
|
||||
dockerfile: workspace84.Dockerfile
|
||||
inbucket:
|
||||
extends:
|
||||
file: docker-compose.base.yml
|
||||
|
7
dockerfiles/php-fpm/php84.Dockerfile
Normal file
7
dockerfiles/php-fpm/php84.Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
# syntax = edrevo/dockerfile-plus
|
||||
FROM dimti/php:8.4
|
||||
|
||||
ARG PHP_VERSION=8.4
|
||||
ENV PHP_VERSION ${PHP_VERSION}
|
||||
|
||||
INCLUDE+ ./php.base.Dockerfile
|
7
dockerfiles/workspace/workspace84.Dockerfile
Normal file
7
dockerfiles/workspace/workspace84.Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
# syntax = edrevo/dockerfile-plus
|
||||
FROM dimti/workspace:8.4
|
||||
|
||||
ARG PHP_VERSION=8.4
|
||||
ENV PHP_VERSION ${PHP_VERSION}
|
||||
|
||||
INCLUDE+ ./workspace.base.Dockerfile
|
@ -23,6 +23,12 @@ services:
|
||||
service: php-fpm
|
||||
build:
|
||||
dockerfile: fpm/php83.Dockerfile
|
||||
php84:
|
||||
extends:
|
||||
file: docker-compose.base.yml
|
||||
service: php-fpm
|
||||
build:
|
||||
dockerfile: fpm/php84.Dockerfile
|
||||
workspace74:
|
||||
extends:
|
||||
file: docker-compose.base.yml
|
||||
@ -47,3 +53,9 @@ services:
|
||||
service: workspace
|
||||
build:
|
||||
dockerfile: workspace/workspace83.Dockerfile
|
||||
workspace84:
|
||||
extends:
|
||||
file: docker-compose.base.yml
|
||||
service: workspace
|
||||
build:
|
||||
dockerfile: workspace/workspace84.Dockerfile
|
||||
|
8
src/dockerfiles/php/fpm/php84.Dockerfile
Normal file
8
src/dockerfiles/php/fpm/php84.Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
# syntax = edrevo/dockerfile-plus
|
||||
FROM php:8.4-fpm
|
||||
|
||||
INCLUDE+ ./fpm/php.base.Dockerfile
|
||||
|
||||
ARG XDEBUG_INI_PATH=/usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
COPY ./xdebug3.ini ${XDEBUG_INI_PATH}
|
@ -8,7 +8,7 @@ ARG PGID=1000
|
||||
|
||||
# For more infromation about set command: See https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
||||
# RUN set -xe
|
||||
|
||||
RUN userdel -r ubuntu
|
||||
RUN groupadd -g ${PGID} laradock && \
|
||||
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
|
||||
usermod -p "*" laradock -s /bin/bash
|
||||
|
9
src/dockerfiles/php/workspace/workspace84.Dockerfile
Normal file
9
src/dockerfiles/php/workspace/workspace84.Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
# syntax = edrevo/dockerfile-plus
|
||||
FROM laradock/workspace:latest-8.4
|
||||
|
||||
ARG PHP_VERSION=8.4
|
||||
ENV PHP_VERSION ${PHP_VERSION}
|
||||
|
||||
INCLUDE+ ./workspace/workspace.base.Dockerfile
|
||||
|
||||
INCLUDE+ ./workspace/xdebug3.Dockerfile
|
Reference in New Issue
Block a user