Created
February 22, 2017 14:54
-
-
Save mewm/15e62c27fcfac1d5bacdac2846c01497 to your computer and use it in GitHub Desktop.
Sane bootstrap project
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
COMPOSE_PROJECT_NAME=que | |
APP_DOMAIN=que.dev:1337 | |
APP_ENV=local | |
APP_DEBUG=true | |
APP_KEY=base64:bL0u0tMo8TFA8yIrBKAbMfONQ/uIZSqNcN4PlXniYTc= | |
DB_HOST=mariadb | |
DB_DATABASE=que | |
DB_USERNAME=que | |
DB_PASSWORD=que |
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
version: '2' | |
services: | |
appsource: | |
image: busybox | |
volumes: | |
- ./:/var/www/site | |
nginx: | |
image: nginx:mainline-alpine | |
volumes: | |
- ./docker/nginx.conf:/etc/nginx/nginx.conf | |
volumes_from: | |
- appsource | |
ports: | |
- 1337:80 | |
links: | |
- phpfpm | |
# Database | |
mariadb: | |
image: mariadb:latest | |
environment: | |
MYSQL_ROOT_PASSWORD: que | |
MYSQL_DATABASE: que | |
MYSQL_USER: que | |
MYSQL_PASSWORD: que | |
ports: | |
- 3306:3306 | |
phpfpm: | |
volumes_from: | |
- appsource | |
build: | |
context: docker/php | |
image: mewm/que:latest | |
links: | |
- mariadb | |
env_file: | |
- .env.docker | |
working_dir: /var/www/site | |
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
user nginx; | |
worker_processes auto; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 10000; | |
} | |
http { | |
sendfile off; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log warn; | |
server { | |
listen 80; | |
root /var/www/site/public; | |
index index.php index.htm index.html; | |
client_max_body_size 100m; | |
add_header x-content-type-options nosniff; | |
location ~ \.php$ { | |
try_files $uri /index.php?$query_string; | |
include fastcgi_params; | |
fastcgi_connect_timeout 30s; | |
fastcgi_read_timeout 30s; | |
fastcgi_buffers 256 4k; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass phpfpm:9000; | |
} | |
location / { | |
autoindex off; | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|svg|woff|woff2|ttf)\$ { | |
expires 1M; | |
access_log off; | |
add_header Cache-Control "public"; | |
} | |
location ~* \.(?:css|js)\$ { | |
expires 7d; | |
access_log off; | |
add_header Cache-Control "public"; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} | |
} |
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
FROM php:7-fpm-alpine | |
LABEL maintainer "root@mewm.org" | |
RUN apk upgrade --update | |
RUN docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql | |
#openssl mbstring tokenizer xml | |
ADD ./php.ini /usr/local/etc/php/conf.d/php.ini |
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
upload_max_filesize = 64M | |
memory_limit = 256M | |
opcache.enable=1 | |
opcache.enable_cli=0 | |
# Check for changes every time | |
opcache.revalidate_freq=0 | |
#opcache.validate_timestamps - use 1 for dev environment | |
opcache.validate_timestamps=1 | |
opcache.max_accelerated_files=10000 | |
opcache.memory_consumption=192 | |
opcache.interned_strings_buffer=16 | |
opcache.fast_shutdown=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment