Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramtamtam committed Sep 17, 2018
1 parent 50a3896 commit 47b3723
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 50 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v2.3.0

### Changed

- Basic sources URIs
- (docker) Now docker image based on [PHPPM][phppm]

[phppm]:https://github.com/php-pm/php-pm

## v2.2.1

### Added
Expand Down
43 changes: 17 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,30 @@
FROM php:7.2-alpine
FROM phppm/nginx:latest
LABEL Description="Mikrotik hosts parser application container"

ENV COMPOSER_HOME /usr/local/share/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV PATH "$COMPOSER_HOME:$COMPOSER_HOME/vendor/bin:$PATH"
COPY . /app/src

WORKDIR /app/src

# Install basic deps
RUN \
docker-php-ext-install opcache \
echo -e "\n\
alias ls='ls --color=auto';\n\
export PS1='\[\e[1;31m\]\$(echo \"[\"\${?/0/}\"]\" | sed \"s/\\[\\]//\")\$(echo \"\[\e[32m\][hosts-parser] \
\[\e[37m\]\")\u@\h: \[\e[00m\]\w \\$ ';\n\n" >> /root/.bashrc \
&& php --version \
&& mkdir -pv $COMPOSER_HOME && chmod -R g+w $COMPOSER_HOME \
&& export COMPOSER_HOME="/usr/local/share" \
&& export COMPOSER_ALLOW_SUPERUSER="1" \
&& export PATH="$COMPOSER_HOME:$COMPOSER_HOME/vendor/bin:$PATH" \
&& php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" \
&& php -r "if(hash_file('SHA384','/tmp/composer-setup.php')==='544e09ee996cdf60ece3804abc52599c22b1f40f4323403c'.\
'44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061'){echo 'Verified';}else{unlink('/tmp/composer-setup.php');}" \
&& php /tmp/composer-setup.php --filename=composer --install-dir=$COMPOSER_HOME \
&& rm -Rf /tmp/* \
&& $COMPOSER_HOME/composer --no-interaction global require 'hirak/prestissimo' \
&& $COMPOSER_HOME/composer --version && $COMPOSER_HOME/composer global info \
&& rm -rf /tmp/composer-setup* \
&& mkdir -pv /app/src

WORKDIR /app/src

# Copy application sources and configs
COPY . /app/src
COPY ./docker-entrypoint.sh /docker-entrypoint.sh

# Make composer install and configure other applications
RUN \
cd /app/src \
&& composer install --no-interaction --no-suggest --no-dev \
&& composer clear-cache \
&& chmod +x /docker-entrypoint.sh \
&& php ./artisan
&& composer dump-autoload \
&& php ./artisan cache:clear

VOLUME ["/app/src"]

STOPSIGNAL SIGTERM
EXPOSE 80
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["php", "-S", "0.0.0.0:80", "-t", "./public"]
CMD ["--bootstrap=laravel", "--app-env=prod", "--workers=8", "--static-directory=public/"]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Version][badge_packagist_version]][link_packagist]
[![Version][badge_php_version]][link_packagist]
[![PPM Compatible][badge_ppm]][link_ppm]
[![Build Status][badge_build_status]][link_build_status]
[![Coverage][badge_coverage]][link_coverage]
[![Code quality][badge_code_quality]][link_coverage]
Expand Down Expand Up @@ -68,6 +69,7 @@ This is open-sourced software licensed under the [MIT License][link_license].

[badge_packagist_version]:https://img.shields.io/packagist/v/tarampampam/mikrotik-hosts-parser.svg?style=flat-square&maxAge=180
[badge_php_version]:https://img.shields.io/packagist/php-v/tarampampam/mikrotik-hosts-parser.svg?style=flat-square&longCache=true
[badge_ppm]:https://raw.githubusercontent.com/php-pm/ppm-badge/master/ppm-badge.png
[badge_build_status]:https://img.shields.io/scrutinizer/build/g/tarampampam/mikrotik-hosts-parser.svg?style=flat-square&maxAge=180&logo=scrutinizer
[badge_code_quality]:https://img.shields.io/scrutinizer/g/tarampampam/mikrotik-hosts-parser.svg?style=flat-square&maxAge=180
[badge_coverage]:https://img.shields.io/scrutinizer/coverage/g/tarampampam/mikrotik-hosts-parser.svg?style=flat-square&maxAge=180
Expand All @@ -82,6 +84,7 @@ This is open-sourced software licensed under the [MIT License][link_license].
[badge_docker_size]:https://images.microbadger.com/badges/image/tarampampam/mikrotik-hosts-parser:latest.svg?style=flat-square
[link_releases]:https://github.com/tarampampam/mikrotik-hosts-parser/releases
[link_packagist]:https://packagist.org/packages/tarampampam/mikrotik-hosts-parser
[link_ppm]:https://github.com/php-pm/php-pm
[link_build_status]:https://scrutinizer-ci.com/g/tarampampam/mikrotik-hosts-parser/build-status/master
[link_coverage]:https://scrutinizer-ci.com/g/tarampampam/mikrotik-hosts-parser/?branch=master
[link_changes_log]:https://github.com/tarampampam/mikrotik-hosts-parser/blob/master/CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [

// Версия
'version' => '2.2.0',
'version' => '2.3.0',

/*
|--------------------------------------------------------------------------
Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ services:
application:
container_name: mikrotik-parser-app
restart: on-failure
build:
context: .
dockerfile: Dockerfile
build: .
environment:
APP_KEY: 'SOME_RANDOM_STRING_HERE'
AUTHOR_EMAIL: '[email protected]'
REDIRECT_IP: '127.0.0.2'
#REDIRECT_IP: '127.0.0.1'
EXCLUDED_HOSTS: 'localhost'
SCRIPT_AD_ENTRIES_COMMENT: 'ADBlock'
#SCRIPT_AD_ENTRIES_COMMENT: 'ADBlock'
LIMIT_USER_SOURCES: 8
LIMIT_RESULT_ENTRIES: 0
LIMIT_SOURCE_CACHE_LIFETIME: 7200
Expand All @@ -24,4 +22,4 @@ services:
#FORCE_HTTPS: 'true'
#APP_URL: 'http://mydomain3.com'
ports:
- "8000:80"
- '8000:80'
17 changes: 0 additions & 17 deletions docker-entrypoint.sh

This file was deleted.

0 comments on commit 47b3723

Please sign in to comment.