initial draft from chatgpt
This commit is contained in:
31
dockerfile
Normal file
31
dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM php:8.3-fpm
|
||||||
|
|
||||||
|
# Dependencies, including MariaDB
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
mariadb-server supervisor curl unzip php-gd php-mbstring php-bcmath php-pdo-mysql php-zip \
|
||||||
|
fonts-noto-cjk-extra fonts-wqy-microhei fonts-wqy-zenhei xfonts-wqy \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Prepare directories
|
||||||
|
RUN mkdir -p /mnt/data/mysql /mnt/data/storage /mnt/data/public \
|
||||||
|
&& chown -R mysql:mysql /mnt/data/mysql \
|
||||||
|
&& chown -R www-data:www-data /mnt/data/storage /mnt/data/public
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
# Install InvoiceNinja
|
||||||
|
RUN curl -sL "https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz" | \
|
||||||
|
tar -xz --strip-components=1
|
||||||
|
|
||||||
|
COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
||||||
|
CMD curl -f http://localhost/ || exit 1
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
CMD ["supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||||
|
|
||||||
Reference in New Issue
Block a user