mirror of
https://github.com/anthonyaxenov/iptv.git
synced 2024-11-01 01:26:00 +00:00
Compose для дев/прод окружений
This commit is contained in:
parent
f0cfe4eda7
commit
2d5b9be5a0
1
.env.example
Normal file
1
.env.example
Normal file
@ -0,0 +1 @@
|
|||||||
|
IPTV_ENV=dev
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,8 +4,7 @@ downloaded/
|
|||||||
/src/commit
|
/src/commit
|
||||||
/src/cache/*
|
/src/cache/*
|
||||||
/src/vendor
|
/src/vendor
|
||||||
/src/views/custom/*
|
/src/views/custom.twig
|
||||||
!/src/views/custom/custom.twig.example
|
|
||||||
*.log
|
*.log
|
||||||
.env
|
.env
|
||||||
*.m3u
|
*.m3u
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
version: '3'
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
iptv:
|
iptv:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
@ -8,14 +6,19 @@ services:
|
|||||||
|
|
||||||
php:
|
php:
|
||||||
container_name: iptv-php
|
container_name: iptv-php
|
||||||
build: 'docker/php'
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- PHP_IDE_CONFIG=serverName=iptv.local
|
||||||
|
build:
|
||||||
|
dockerfile: docker/php/${IPTV_ENV}.dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- iptv
|
- iptv
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
|
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
|
||||||
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/php.ini:ro
|
- ./docker/php/${IPTV_ENV}.php.ini:/usr/local/etc/php/conf.d/php.ini:ro
|
||||||
- ./log/php:/var/log/php:rw
|
- ./log/php:/var/log/php:rw
|
||||||
- ./src:/var/www:rw
|
- ./src:/var/www:rw
|
||||||
- ./playlists.ini:/var/www/config/playlists.ini:ro
|
- ./playlists.ini:/var/www/config/playlists.ini:ro
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
FROM php:8.1-fpm
|
FROM php:8.2-fpm
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt upgrade -y && \
|
apt upgrade -y && \
|
||||||
apt install -y git && \
|
apt install -y git unzip 7zip
|
||||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
|
||||||
|
|
||||||
# https://pecl.php.net/package/xdebug
|
# https://pecl.php.net/package/xdebug
|
||||||
RUN pecl channel-update pecl.php.net && \
|
RUN pecl channel-update pecl.php.net && \
|
||||||
pecl install xdebug-3.1.5 && \
|
pecl install xdebug-3.3.2 unzip && \
|
||||||
mkdir -p /var/log/php
|
mkdir -p /var/log/php
|
||||||
|
|
||||||
|
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
CMD composer install
|
CMD composer install
|
||||||
CMD php-fpm
|
ENTRYPOINT php-fpm
|
@ -15,18 +15,10 @@ opcache.jit = tracing
|
|||||||
|
|
||||||
[xdebug]
|
[xdebug]
|
||||||
; https://xdebug.org/docs/all_settings
|
; https://xdebug.org/docs/all_settings
|
||||||
|
|
||||||
; закомментировать для выключения
|
|
||||||
zend_extension = xdebug.so
|
zend_extension = xdebug.so
|
||||||
|
xdebug.mode = debug
|
||||||
; для отладки установить значение 'develop,debug'
|
xdebug.start_with_request = yes
|
||||||
xdebug.mode = develop
|
|
||||||
|
|
||||||
; для отладки при каждом запросе поменять 'trigger' на 'yes'
|
|
||||||
; иначе -- отправлять заголовок 'Cookie: XDEBUG_TRIGGER=go'
|
|
||||||
xdebug.start_with_request = trigger
|
|
||||||
xdebug.trigger_value = go
|
xdebug.trigger_value = go
|
||||||
|
|
||||||
xdebug.client_host = 172.17.0.1
|
xdebug.client_host = 172.17.0.1
|
||||||
xdebug.REQUEST = *
|
xdebug.REQUEST = *
|
||||||
xdebug.SESSION = *
|
xdebug.SESSION = *
|
12
docker/php/prod.dockerfile
Normal file
12
docker/php/prod.dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM php:8.2-fpm
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt upgrade -y && \
|
||||||
|
apt install -y git
|
||||||
|
|
||||||
|
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
|
||||||
|
|
||||||
|
EXPOSE 9000
|
||||||
|
WORKDIR /var/www
|
||||||
|
CMD composer install
|
||||||
|
ENTRYPOINT php-fpm
|
14
docker/php/prod.php.ini
Normal file
14
docker/php/prod.php.ini
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[PHP]
|
||||||
|
error_reporting = E_ALL
|
||||||
|
file_uploads = Off
|
||||||
|
; upload_max_filesize=10M
|
||||||
|
; post_max_size=10M
|
||||||
|
|
||||||
|
[opcache]
|
||||||
|
opcache.enable = 1
|
||||||
|
opcache.enable_cli = 1
|
||||||
|
opcache.memory_consumption = 128
|
||||||
|
opcache.max_accelerated_files = 30000
|
||||||
|
opcache.revalidate_freq = 0
|
||||||
|
opcache.jit_buffer_size = 64M
|
||||||
|
opcache.jit = tracing
|
Loading…
Reference in New Issue
Block a user