-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from 20uf/feat/improve-docker
Refactoring docker
- Loading branch information
Showing
9 changed files
with
174 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,30 @@ | ||
DC=docker-compose | ||
RUN=$(DC) run --rm app | ||
|
||
.DEFAULT_GOAL := help | ||
.PHONY: help start bash stop | ||
|
||
help: | ||
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
||
start: ## Start the project | ||
start: build up vendor go_bash | ||
|
||
bash: ## Go to the bash container of the application | ||
bash: go_bash | ||
|
||
stop: ## Stop docker containers | ||
$(DC) kill | ||
|
||
# Internal rules | ||
build: | ||
$(DC) build | ||
|
||
up: | ||
$(DC) up -d | ||
|
||
go_bash: | ||
@$(RUN) bash | ||
|
||
vendor: composer.lock | ||
@$(RUN) composer install |
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,9 +1,10 @@ | ||
version: '2' | ||
|
||
services: | ||
php: | ||
build: . | ||
environment: | ||
SYMFONY_ENV: dev | ||
volumes: | ||
- ./:/srv/certificationy | ||
app: | ||
build: | ||
context: docker/7.1 | ||
environment: | ||
SYMFONY_ENV: dev | ||
volumes: | ||
- ./:/app |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
FROM php:7.1-fpm-alpine | ||
|
||
RUN apk add --no-cache --virtual .persistent-deps \ | ||
bash \ | ||
git \ | ||
icu-libs \ | ||
zlib \ | ||
wget \ | ||
ca-certificates \ | ||
curl | ||
|
||
RUN set -xe \ | ||
&& apk add --no-cache --virtual .build-deps \ | ||
$PHPIZE_DEPS \ | ||
icu-dev \ | ||
zlib-dev \ | ||
&& docker-php-ext-install \ | ||
intl \ | ||
zip \ | ||
&& apk del .build-deps | ||
|
||
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser | ||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
|
||
WORKDIR /app | ||
|
||
COPY php.ini /usr/local/etc/php/php.ini | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ | ||
composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --optimize-autoloader --classmap-authoritative \ | ||
&& composer clear-cache | ||
|
||
COPY start.sh /usr/local/bin/docker-app-start | ||
|
||
RUN chmod +x /usr/local/bin/docker-app-start | ||
|
||
CMD ["docker-app-start"] |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.