Skip to content
Permalink
Browse files

Replace the deprecated Docker stack with a modern stack: PHP 7.3, ngi…

…nx and MariaDB
  • Loading branch information
Kovah committed Jan 6, 2020
1 parent 2bdc3ad commit e4841054a4880b4c9f8aebbcb875f0c4bf8a48db
Showing with 117 additions and 22 deletions.
  1. +0 −22 Dockerfile
  2. +35 −0 application/docker/nginx/site.conf
  3. +38 −0 application/docker/php/php-dev.ini
  4. +44 −0 docker-compose.yml

This file was deleted.

@@ -0,0 +1,35 @@

server {
root /app;
listen 0.0.0.0:8085;
server_name _;
index index.php;
charset utf-8;
client_max_body_size 100M;
port_in_redirect off;

# Location configs
location / {
try_files $uri $uri/ /index.php;
}

# CSS and Javascript
location ~* \.(?:css|js|map|scss)$ {
expires 7d;
access_log off;
add_header Cache-Control "public";
try_files $uri =404;
}

# PHP handling
location ~ \.php$ {
fastcgi_pass php:9000;

try_files $uri /index.php;
include fastcgi.conf;
fastcgi_keep_conn on;
fastcgi_intercept_errors on;
fastcgi_index index.php;
fastcgi_read_timeout 300;
}
}
@@ -0,0 +1,38 @@

; miscellaneous
; -------------

expose_php = Off

; resource limits
; ---------------

max_execution_time = 30
max_input_time = 60
memory_limit = 128M
upload_max_filesize = 20M
post_max_size = 20M

; xDebug
; -------

;zend_extension = /opt/bitnami/php/lib/php/extensions/xdebug.so
;xdebug.idekey = "phpstorm"
;xdebug.remote_enable = 1
;xdebug.remote_host = docker.for.mac.localhost
;xdebug.remote_port = 10000
;xdebug.remote_connect_back = 0
;xdebug.remote_log = /tmp/xdebug_remote.log
;xdebug.max_nesting_level = 300
;xdebug.scream = 0
;xdebug.cli_color = 1
;xdebug.show_local_vars = 1

; opcache
; -------

opcache.enable = 1
opcache.revalidate_freq = 2
opcache.validate_timestamps = 1
opcache.interned_strings_buffer = 32
opcache.memory_consumption = 256
@@ -0,0 +1,44 @@
---
version: "3"

services:

# --- MariaDB 10.3
db:
container_name: "invoiceplane-db"
image: bitnami/mariadb:10.3
environment:
- MARIADB_ROOT_PASSWORD=ipdevdb
- MARIADB_USER=ipdevdb
- MARIADB_PASSWORD=ipdevdb
- MARIADB_DATABASE=ipdevdb
ports:
- "127.0.0.1:3306:3306"
volumes:
- invoiceplane-db:/bitnami

# --- PHP 7.3
php:
container_name: "invoiceplane-php"
image: bitnami/php-fpm:7.3
depends_on:
- db
volumes:
- .:/app:delegated
- ./application/docker/php/php-dev.ini:/opt/bitnami/php/etc/conf.d/php.ini:ro

# --- nginx 1.16
nginx:
container_name: "invoiceplane-nginx"
image: bitnami/nginx:1.16
ports:
- "80:8085"
depends_on:
- php
volumes:
- .:/app:delegated
- ./application/docker/nginx/site.conf:/opt/bitnami/nginx/conf/vhosts/site.conf:ro

volumes:
invoiceplane-db:
driver: local

0 comments on commit e484105

Please sign in to comment.
You can’t perform that action at this time.