-
Notifications
You must be signed in to change notification settings - Fork 19
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 #53 from lopes-vincent/docker
Add docker + other various fixes
- Loading branch information
Showing
8 changed files
with
213 additions
and
77 deletions.
There are no files selected for viewing
Empty file.
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,55 @@ | ||
server { | ||
listen 80; | ||
|
||
root /application/web/; | ||
index index.php; | ||
|
||
access_log /var/log/nginx/starter.tld_access.log; | ||
error_log /var/log/nginx/starter.tld_error.log; | ||
|
||
|
||
location / { | ||
try_files $uri $uri/ @rewriteapp; | ||
} | ||
|
||
location @rewriteapp { | ||
# rewrite all to index.php | ||
rewrite ^(.*)$ /index.php/$1 last; | ||
} | ||
|
||
# Php configuration | ||
location ~ ^/(index|index_dev)\.php(/|$) { | ||
# Php-FPM Config (Socks or Network) | ||
#fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; | ||
fastcgi_pass php-fpm:9000; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_read_timeout 3000; | ||
} | ||
|
||
# Security. discard all files and folders starting with a "." | ||
location ~ /\. { | ||
deny all; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
# Stuffs | ||
location = /favicon.ico { | ||
allow all; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
location ~ /robots.txt { | ||
allow all; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
|
||
# Static files | ||
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|pdf|zip)$ { | ||
expires 30d; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
} |
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,19 @@ | ||
FROM phpdockerio/php73-fpm:latest | ||
WORKDIR "/application" | ||
|
||
# Fix debconf warnings upon build | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install selected extensions and other stuff | ||
RUN apt-get update \ | ||
&& apt-get -y --no-install-recommends install php7.3-mysql php7.3-gd php-imagick php7.3-intl php-xdebug \ | ||
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | ||
|
||
# Install git | ||
RUN apt-get update \ | ||
&& apt-get -y install git \ | ||
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install vim \ | ||
&& apt-get clean; |
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,14 @@ | ||
upload_max_filesize = 100M | ||
post_max_size = 108M | ||
html_errors=On | ||
display_errors=On | ||
date.timezone=Europe/Paris | ||
max_execution_time = 80 | ||
|
||
xdebug.remote_enable=1 | ||
xdebug.remote_autostart=0 | ||
xdebug.remote_port=9000 | ||
xdebug.remote_handler=dbgp | ||
xdebug.profiler_enable=0 | ||
xdebug.profiler_enable_trigger=1 | ||
xdebug.profiler_output_dir="/application/log" |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: "3.1" | ||
|
||
services: | ||
|
||
mariadb: | ||
image: mariadb:10.1 | ||
container_name: thelia-mariadb | ||
working_dir: /application | ||
volumes: | ||
- .:/application | ||
- .docker/mysql-data:/var/lib/mysql | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=root | ||
- MYSQL_DATABASE=thelia | ||
- MYSQL_USER=thelia | ||
- MYSQL_PASSWORD=thelia | ||
ports: | ||
- "8086:3306" | ||
|
||
webserver: | ||
image: nginx:alpine | ||
container_name: thelia-webserver | ||
working_dir: /application | ||
volumes: | ||
- .:/application | ||
- .docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf | ||
ports: | ||
- "8080:80" | ||
|
||
php-fpm: | ||
build: .docker/php-fpm | ||
container_name: thelia-php-fpm | ||
working_dir: /application | ||
volumes: | ||
- .:/application | ||
- .docker/php-fpm/php-ini-overrides.ini:/etc/php/7.3/fpm/conf.d/99-overrides.ini | ||
- .docker/php-fpm/php-ini-overrides.ini:/etc/php/7.3/cli/conf.d/99-overrides.ini |