This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paramtamtam
committed
Sep 17, 2018
1 parent
50a3896
commit 47b3723
Showing
6 changed files
with
34 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -24,4 +22,4 @@ services: | |
#FORCE_HTTPS: 'true' | ||
#APP_URL: 'http://mydomain3.com' | ||
ports: | ||
- "8000:80" | ||
- '8000:80' |
This file was deleted.
Oops, something went wrong.