38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
FROM debian:bookworm
|
|
|
|
WORKDIR /app
|
|
|
|
COPY app /app
|
|
|
|
RUN apt-get update && apt-get full-upgrade -y && apt-get autoremove -y && apt-get autoclean -y
|
|
|
|
#RUN /app/scripts/sury-php-repo.sh
|
|
|
|
RUN /app/scripts/install-dependencies.sh
|
|
|
|
RUN git clone --branch 21.0 --single-branch --depth 1 https://github.com/Dolibarr/dolibarr.git
|
|
|
|
RUN chown -R www-data:www-data /app/dolibarr
|
|
|
|
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/dolibarr-selfsigned.key -out /etc/ssl/certs/dolibarr-selfsigned.crt -subj "/CN=dolibarr"
|
|
|
|
RUN chmod 0440 /etc/ssl/private/dolibarr-selfsigned.key && chmod 0444 /etc/ssl/certs/dolibarr-selfsigned.crt && chown www-data:www-data /etc/ssl/private/dolibarr-selfsigned.key && chown www-data:www-data /etc/ssl/certs/dolibarr-selfsigned.crt
|
|
|
|
RUN /app/scripts/create_databases.sh
|
|
|
|
RUN mv /app/dolibarr.conf /etc/nginx/sites-available/dolibarr.conf && rm /etc/nginx/sites-enabled/default
|
|
|
|
ENV PORT=8080
|
|
|
|
EXPOSE 8080
|
|
|
|
#CMD ["/app/launch-daemons.sh"]
|
|
VOLUME ["/mnt/dolibarr_vol"]
|
|
|
|
ENTRYPOINT ["/app/scripts/launch-daemons.sh"]
|
|
|
|
HEALTHCHECK --interval=5m --timeout=30s \
|
|
CMD /app/scripts/healthchecker.sh || exit 1
|
|
|
|
|