Add Akaunting 3 compatibility

This commit is contained in:
Mohammed Al-Mahdawi 2022-06-01 10:42:01 +03:00
parent 625ca15b46
commit e5d5a0d148
6 changed files with 48 additions and 41 deletions

View File

@ -1,4 +1,4 @@
FROM php:7.4-apache
FROM php:8.1-apache
ARG AKAUNTING_DOCKERFILE_VERSION=0.1
ARG SUPPORTED_LOCALES="en_US.UTF-8"

View File

@ -1,4 +1,4 @@
FROM php:7.4-fpm-alpine3.12
FROM php:8.1-fpm-alpine3.15
# Arguments defined in docker-compose.yml
ARG AKAUNTING_DOCKERFILE_VERSION=0.1
@ -6,15 +6,15 @@ ARG SUPPORTED_LOCALES="en_US.UTF-8"
# Add Repositories
RUN rm -f /etc/apk/repositories &&\
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/community" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/community" >> /etc/apk/repositories
# Add Dependencies
RUN apk add --update --no-cache \
gcc \
g++ \
make \
python2 \
python3 \
supervisor \
vim \
bash \
@ -44,14 +44,22 @@ RUN npm config rm https-proxy
# Download Akaunting application
RUN mkdir -p /var/www/html
RUN cd /var/www/html && git clone https://github.com/akaunting/akaunting.git . && composer install && npm install && npm run dev
COPY files/akaunting-php-fpm-nginx-supervisord.sh /usr/local/bin/akaunting-php-fpm-nginx-supervisord.sh
COPY files/html /var/www/html
# Setup Working Dir
WORKDIR /var/www/html
RUN git clone https://github.com/akaunting/akaunting.git .
RUN chown -R www-data:www-data /var/www/html
USER www-data
RUN composer prod
RUN npm install
RUN npm run prod
COPY files/akaunting-php-fpm-nginx-supervisord.sh /usr/local/bin/akaunting-php-fpm-nginx-supervisord.sh
COPY files/html /var/www/html
USER root
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/akaunting-php-fpm-nginx-supervisord.sh"]
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

View File

@ -1,4 +1,4 @@
FROM php:7.4-fpm-alpine3.12
FROM php:8.1-fpm-alpine3.15
# Arguments defined in docker-compose.yml
ARG AKAUNTING_DOCKERFILE_VERSION=0.1
@ -6,15 +6,15 @@ ARG SUPPORTED_LOCALES="en_US.UTF-8"
# Add Repositories
RUN rm -f /etc/apk/repositories &&\
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/community" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/community" >> /etc/apk/repositories
# Add Dependencies
RUN apk add --update --no-cache \
gcc \
g++ \
make \
python2 \
python3 \
nano \
bash \
nodejs \
@ -43,14 +43,22 @@ RUN npm config rm https-proxy
# Download Akaunting application
RUN mkdir -p /var/www/html
RUN cd /var/www/html && git clone https://github.com/akaunting/akaunting.git . && composer install && npm install && npm run dev
COPY files/akaunting-php-fpm-nginx.sh /usr/local/bin/akaunting-php-fpm-nginx.sh
COPY files/html /var/www/html
# Setup Working Dir
WORKDIR /var/www/html
RUN git clone https://github.com/akaunting/akaunting.git .
RUN chown -R www-data:www-data /var/www/html
USER www-data
RUN composer prod
RUN npm install
RUN npm run prod
COPY files/akaunting-php-fpm-nginx.sh /usr/local/bin/akaunting-php-fpm-nginx.sh
COPY files/html /var/www/html
USER root
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/akaunting-php-fpm-nginx.sh"]
CMD ["--start"]

View File

@ -1,4 +1,4 @@
FROM php:7.4-fpm-alpine3.12
FROM php:8.1-fpm-alpine3.15
# Arguments defined in docker-compose.yml
ARG AKAUNTING_DOCKERFILE_VERSION=0.1
@ -6,8 +6,8 @@ ARG SUPPORTED_LOCALES="en_US.UTF-8"
# Add Repositories
RUN rm -f /etc/apk/repositories &&\
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/community" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/community" >> /etc/apk/repositories
# Add Dependencies
RUN apk add --update --no-cache \

View File

@ -1,4 +1,4 @@
FROM php:7.4-fpm-alpine3.12
FROM php:8.1-fpm-alpine3.15
# Arguments defined in docker-compose.yml
ARG AKAUNTING_DOCKERFILE_VERSION=0.1
@ -6,8 +6,8 @@ ARG SUPPORTED_LOCALES="en_US.UTF-8"
# Add Repositories
RUN rm -f /etc/apk/repositories &&\
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/community" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.15/community" >> /etc/apk/repositories
# Add Build Dependencies
RUN apk add --no-cache --virtual .build-deps \
@ -31,24 +31,15 @@ RUN apk add --update --no-cache \
freetype-dev \
mysql-client
# Configure & Install Extension
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# Install PHP Extensions
RUN chmod +x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions gd zip intl imap xsl pgsql opcache bcmath mysqli pdo_mysql redis pcntl
# Configure Extension
RUN docker-php-ext-configure \
opcache --enable-opcache &&\
docker-php-ext-configure gd --with-jpeg=/usr/include/ --with-freetype=/usr/include/ && \
docker-php-ext-install \
opcache \
mysqli \
pdo \
pdo_mysql \
sockets \
json \
intl \
gd \
xml \
bz2 \
pcntl \
bcmath \
zip
opcache --enable-opcache
# Download Akaunting application
RUN mkdir -p /var/www/akaunting \

View File

@ -1,4 +1,4 @@
FROM php:7.4-fpm
FROM php:8.1-fpm
# Arguments defined in docker-compose.yml
ARG AKAUNTING_DOCKERFILE_VERSION=0.1