mirror of https://github.com/akaunting/docker.git
Merge pull request #3 from monopayments/master
Docker ready for use at 2.0.8
This commit is contained in:
commit
9087401241
|
@ -2,35 +2,22 @@ version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx
|
build: ./nginx
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||||
- .:/var/www/akaunting.test
|
- app-data:/var/www/akaunting
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
|
||||||
akaunting:
|
|
||||||
aliases:
|
|
||||||
- akaunting.test
|
|
||||||
|
|
||||||
app:
|
php:
|
||||||
build: ./php
|
build: ./php
|
||||||
user: "1000:1000"
|
|
||||||
expose:
|
|
||||||
- 9000
|
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/www/akaunting.test
|
- app-data:/var/www/akaunting
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
|
||||||
APP_DEBUG: "true"
|
|
||||||
networks:
|
|
||||||
- akaunting
|
|
||||||
|
|
||||||
mysql:
|
db:
|
||||||
image: mysql:5
|
image: mysql:latest
|
||||||
ports:
|
|
||||||
- 3306:3306
|
|
||||||
volumes:
|
volumes:
|
||||||
- db-data:/var/lib/mysql
|
- db-data:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
|
@ -38,12 +25,18 @@ services:
|
||||||
MYSQL_DATABASE: akaunting_db
|
MYSQL_DATABASE: akaunting_db
|
||||||
MYSQL_USER: akaunting_admin
|
MYSQL_USER: akaunting_admin
|
||||||
MYSQL_PASSWORD: akaunting_password
|
MYSQL_PASSWORD: akaunting_password
|
||||||
networks:
|
|
||||||
- akaunting
|
|
||||||
command: --default-authentication-plugin=mysql_native_password
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
|
|
||||||
volumes:
|
|
||||||
db-data:
|
|
||||||
|
|
||||||
networks:
|
# image: postgres:alpine
|
||||||
akaunting:
|
# volumes:
|
||||||
|
# - db-data:/var/lib/postgresql/data
|
||||||
|
# environment:
|
||||||
|
# POSTGRES_DB: akaunting_db
|
||||||
|
# POSTGRES_USER: akaunting_admin
|
||||||
|
# POSTGRES_PASSWORD: akaunting_password
|
||||||
|
# ports:
|
||||||
|
# - "5432:5432"
|
||||||
|
volumes:
|
||||||
|
app-data:
|
||||||
|
db-data:
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
ENV AKAUNTING_VERSION 2.0.8
|
||||||
|
|
||||||
|
RUN apk update && apk add --no-progress -q wget unzip
|
||||||
|
|
||||||
|
RUN wget https://github.com/akaunting/akaunting/releases/download/${AKAUNTING_VERSION}/Akaunting_${AKAUNTING_VERSION}-Stable.zip
|
||||||
|
RUN mkdir -p /var/www/akaunting
|
||||||
|
RUN unzip Akaunting_${AKAUNTING_VERSION}-Stable.zip -d /var/www/akaunting
|
||||||
|
RUN rm Akaunting_${AKAUNTING_VERSION}-Stable.zip
|
||||||
|
|
||||||
|
RUN chmod -R 777 /var/www/akaunting
|
|
@ -1,12 +1,12 @@
|
||||||
server {
|
server {
|
||||||
server_name akaunting.test;
|
server_name akaunting;
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
|
|
||||||
access_log /dev/stdout;
|
access_log /dev/stdout;
|
||||||
error_log /dev/stdout;
|
error_log /dev/stdout;
|
||||||
|
|
||||||
root /var/www/akaunting.test;
|
root /var/www/akaunting;
|
||||||
index index.php index.html;
|
index index.html index.htm index.php;
|
||||||
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
add_header X-XSS-Protection "1; mode=block";
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
@ -20,7 +20,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prevent Direct Access To Protected Folders
|
# Prevent Direct Access To Protected Folders
|
||||||
location ~ ^/(^app$|bootstrap|config|database|resources|routes|storage|tests|artisan) {
|
location ~ ^/(^app$|bootstrap|config|database|overrides|resources|routes|storage|tests|artisan) {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,15 +29,17 @@ server {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_page 404 /index.php;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
gzip_static on;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Pass PHP Scripts To FastCGI Server
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass app:9000;
|
fastcgi_pass php:9000;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
@ -1,9 +1,10 @@
|
||||||
FROM php:7.2-fpm
|
FROM php:7.4-fpm
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
imagemagick \
|
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
|
libzip-dev \
|
||||||
|
imagemagick \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
|
@ -13,24 +14,20 @@ RUN apt-get update && apt-get install -y \
|
||||||
patch \
|
patch \
|
||||||
unzip \
|
unzip \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
|
zip \
|
||||||
--no-install-recommends && \
|
--no-install-recommends && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
|
||||||
|
|
||||||
RUN cp /usr/share/i18n/SUPPORTED /etc/locale.gen
|
RUN cp /usr/share/i18n/SUPPORTED /etc/locale.gen
|
||||||
RUN locale-gen
|
RUN locale-gen
|
||||||
|
|
||||||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
|
|
||||||
|
|
||||||
RUN docker-php-ext-install \
|
RUN docker-php-ext-install \
|
||||||
gd \
|
gd \
|
||||||
|
bcmath \
|
||||||
pcntl \
|
pcntl \
|
||||||
|
pdo \
|
||||||
|
pdo_pgsql \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
zip
|
zip
|
||||||
|
|
||||||
RUN pecl channel-update pecl.php.net \
|
|
||||||
&& printf "\n" | pecl install mcrypt-1.0.2 \
|
|
||||||
&& printf "\n" | pecl install xdebug-2.7.2 \
|
|
||||||
&& docker-php-ext-enable mcrypt xdebug
|
|
||||||
|
|
||||||
COPY conf/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
|
||||||
COPY conf/zz-docker.conf /usr/local/etc/php-fpm.d/zz-docker.conf
|
|
|
@ -1,4 +0,0 @@
|
||||||
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
|
|
||||||
xdebug.remote_connect_back=1
|
|
||||||
xdebug.remote_enable=1
|
|
||||||
xdebug.remote_port=9000
|
|
|
@ -1,10 +0,0 @@
|
||||||
[global]
|
|
||||||
daemonize = no
|
|
||||||
|
|
||||||
[www]
|
|
||||||
listen = 9000
|
|
||||||
|
|
||||||
pm = dynamic
|
|
||||||
pm.max_children = 64
|
|
||||||
pm.process_idle_timeout = 2s
|
|
||||||
pm.max_requests = 1000
|
|
Loading…
Reference in New Issue