This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
6496aef
commit 3b9ae5d
Showing
46 changed files
with
3,582 additions
and
2,056 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
**/*.DS_Store | ||
**/*.log | ||
**/*.md | ||
**/*.php~ | ||
**/*.sql.gz | ||
**/._* | ||
**/.dockerignore | ||
**/.gitignore | ||
**/Dockerfile | ||
**/Thumbs.db | ||
*.env.dist | ||
*.sublime-project | ||
*.sublime-workspace | ||
.editorconfig | ||
.env | ||
.git/ | ||
.gitattributes | ||
.gitlab-ci.yml | ||
.gitmodules | ||
.php_cs.cache | ||
.travis.yml | ||
app/config/parameters.yml | ||
bin/symfony_requirements | ||
build/ | ||
composer.phar | ||
docker-compose.override.yml | ||
docker-compose.yml | ||
docker/db/data/ | ||
var/ | ||
vendor/ | ||
web/index.php | ||
web/bundles/ |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
FROM php:7.1-fpm-alpine | ||
|
||
RUN apk add --no-cache --virtual .persistent-deps \ | ||
git \ | ||
icu-libs \ | ||
zlib | ||
|
||
ENV APCU_VERSION 5.1.8 | ||
|
||
RUN set -xe \ | ||
&& apk add --no-cache --virtual .build-deps \ | ||
$PHPIZE_DEPS \ | ||
icu-dev \ | ||
zlib-dev \ | ||
&& docker-php-ext-install \ | ||
intl \ | ||
pdo_mysql \ | ||
zip \ | ||
&& pecl install \ | ||
apcu-${APCU_VERSION} \ | ||
&& docker-php-ext-enable --ini-name 20-apcu.ini apcu \ | ||
&& docker-php-ext-enable --ini-name 05-opcache.ini opcache \ | ||
&& apk del .build-deps | ||
|
||
COPY docker/app/php.ini /usr/local/etc/php/php.ini | ||
|
||
COPY docker/app/install-composer.sh /usr/local/bin/docker-app-install-composer | ||
RUN chmod +x /usr/local/bin/docker-app-install-composer | ||
|
||
RUN set -xe \ | ||
&& apk add --no-cache --virtual .fetch-deps \ | ||
openssl \ | ||
&& docker-app-install-composer \ | ||
&& mv composer.phar /usr/local/bin/composer \ | ||
&& apk del .fetch-deps | ||
|
||
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser | ||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
|
||
RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --optimize-autoloader --classmap-authoritative \ | ||
&& composer clear-cache | ||
|
||
WORKDIR /srv/prestonbot | ||
|
||
COPY composer.json ./ | ||
|
||
RUN mkdir -p \ | ||
var/cache \ | ||
var/logs \ | ||
var/sessions \ | ||
&& composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest \ | ||
&& composer clear-cache \ | ||
# Permissions hack because setfacl does not work on Mac and Windows | ||
&& chown -R www-data var | ||
|
||
COPY app app/ | ||
COPY bin bin/ | ||
COPY src src/ | ||
COPY web web/ | ||
|
||
RUN composer dump-autoload --optimize --classmap-authoritative --no-dev | ||
|
||
COPY docker/app/docker-entrypoint.sh /usr/local/bin/docker-app-entrypoint | ||
RUN chmod +x /usr/local/bin/docker-app-entrypoint | ||
|
||
ENTRYPOINT ["docker-app-entrypoint"] | ||
CMD ["php-fpm"] |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Makefile for docker use | ||
|
||
APP=docker-compose exec -T app | ||
TAPP=docker-compose exec | ||
TTAPP=docker-compose exec -e APP_ENV=test | ||
CAPP=docker-compose run app composer | ||
CONSOLE=$(APP) /usr/local/bin/php bin/console | ||
|
||
.PHONY: help install start stop destroy composer console app nginx test cs server | ||
|
||
help: ## Show this help | ||
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
||
install: ## Setup the project using Docker and docker-compose | ||
install: start composer-install | ||
|
||
start: ## Start the containers | ||
docker-compose up -d | ||
|
||
stop: ## Stop the Docker containers and remove the volumes | ||
docker-compose down -v | ||
|
||
destroy: ## Destroy all containers, volumes, networks | ||
docker-compose down --rmi all | ||
|
||
composer: ## Composer | ||
$(CAPP) $(filter-out $@,$(MAKECMDGOALS)) | ||
|
||
composer-install: # Install the project PHP dependencies | ||
$(CAPP) install -o | ||
|
||
console: ## Console | ||
$(CONSOLE) $(filter-out $@,$(MAKECMDGOALS)) | ||
|
||
app: ## Shell of Application container | ||
$(TAPP) app sh | ||
|
||
nginx: ## Shell of Nginx container | ||
$(TAPP) nginx sh | ||
|
||
test: ## Launch tests | ||
$(TAPP) app env APP_ENV=test ./vendor/bin/simple-phpunit | ||
|
||
cs: ## Fix Coding styles | ||
$(TAPP) app ./vendor/bin/php-cs-fixer fix | ||
|
||
server: ## Start local PHP server (Non docker use only) | ||
php -S localhost:8888 -t web | ||
|
||
%: | ||
@: |
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
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
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 |
---|---|---|
|
@@ -11,3 +11,4 @@ security: | |
|
||
main: | ||
anonymous: ~ | ||
logout_on_user_change: true |
Oops, something went wrong.