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
Showing
8 changed files
with
112 additions
and
3 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,20 @@ | ||
help: ## Prints this help. | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
|
||
up: ## Builds the docker containers and installs dependencies | ||
docker-compose up -d | ||
|
||
stop: ## stops the docker containers | ||
docker-compose stop | ||
|
||
down: ## destroy all container | ||
docker-compose down | ||
|
||
composer: ## run composer command using: make composer argument=install | ||
docker exec -it jedy-php-fpm php composer.phar | ||
|
||
log: ## see prod logs | ||
tail -f $(PWD)/var/logs/prod.log | ||
|
||
install: ## Install database | ||
docker exec -it jedy-php-fpm php bin/console doctrine:schema:create |
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
Binary file not shown.
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,35 @@ | ||
############################################################################### | ||
# Generated on phpdocker.io # | ||
############################################################################### | ||
|
||
jedy-mysql: | ||
image: mysql:5.7 | ||
container_name: jedy-mysql | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=qwerty | ||
- MYSQL_DATABASE=jedy | ||
- MYSQL_USER=jedy | ||
- MYSQL_PASSWORD=jedy | ||
|
||
jedy-webserver: | ||
image: phpdockerio/nginx:latest | ||
container_name: jedy-webserver | ||
volumes: | ||
- .:/var/www/jedy | ||
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf | ||
ports: | ||
- 80:80 | ||
links: | ||
- jedy-php-fpm | ||
|
||
jedy-php-fpm: | ||
build: . | ||
dockerfile: .docker/php-fpm/Dockerfile | ||
container_name: jedy-php-fpm | ||
volumes: | ||
- .:/var/www/jedy | ||
- ./docker/php-fpm/php-ini-overrides.ini:/etc/php/7.0/fpm/conf.d/99-overrides.ini | ||
links: | ||
- jedy-mysql |
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,43 @@ | ||
server { | ||
listen 80 default; | ||
|
||
client_max_body_size 108M; | ||
|
||
access_log /var/log/nginx/jedy.access.log; | ||
|
||
root /var/www/jedy/web; | ||
|
||
rewrite ^/app\.php/?(.*)$ /$1 permanent; | ||
|
||
try_files $uri @rewriteapp; | ||
|
||
location @rewriteapp { | ||
rewrite ^(.*)$ /app.php/$1 last; | ||
} | ||
|
||
# Deny all . files | ||
location ~ /\. { | ||
deny all; | ||
} | ||
|
||
location ~ ^/(app|app_dev)\.php(/|$) { | ||
fastcgi_pass jedy-php-fpm:9000; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
fastcgi_index app.php; | ||
send_timeout 1800; | ||
fastcgi_read_timeout 1800; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/jedy_php_errors.log"; | ||
fastcgi_buffers 16 16k; | ||
fastcgi_buffer_size 32k; | ||
include fastcgi_params; | ||
} | ||
|
||
# Statics | ||
location /(bundles|media) { | ||
access_log off; | ||
expires 30d; | ||
try_files $uri @rewriteapp; | ||
} | ||
|
||
} |
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,9 @@ | ||
FROM phpdockerio/php7-fpm:latest | ||
|
||
# Install selected extensions and other stuff | ||
RUN apt-get update \ | ||
&& apt-get -y --no-install-recommends install php7.0-mysql php7.0-xdebug \ | ||
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | ||
|
||
|
||
WORKDIR "/var/www/jedy" |
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,2 @@ | ||
upload_max_filesize = 100M | ||
post_max_size = 108M |
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