Compare commits
6 Commits
2286ee380b
...
dev
Author | SHA1 | Date | |
---|---|---|---|
e8e04c9110 | |||
8fbd7e4464 | |||
cbe3e7cc2b | |||
b70af02223 | |||
489400ad70 | |||
77702a36f0 |
1
app/dolibarr
Submodule
1
app/dolibarr
Submodule
Submodule app/dolibarr added at 612f34f719
@@ -1,2 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mariadb --user=dolibarr_user --password=dolipass < /app/scripts/db_schemas/dolibarr.sql #&& echo "Dolibarr user and DB created." || echo "Unable to create database."; exit 1
|
service mariadb status > /dev/null 2>&1 || service mariadb start
|
||||||
|
mariadb --user=root < /app/scripts/dolibarr.sql && echo "Dolibarr user and DB created."
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
CREATE USER 'dolibarr'@'localhost' IDENTIFIED BY 'dolipass';
|
|
||||||
CREATE DATABASE IF NOT EXISTS 'dolibarr';
|
|
||||||
GRANT ALL PRIVILEGES TO dolibarr.* TO 'dolibarr'@'localhost';
|
|
||||||
FLUSH PRIVILEGES;
|
|
4
app/scripts/dolibarr.sql
Normal file
4
app/scripts/dolibarr.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
CREATE USER 'dolibarr'@'localhost' IDENTIFIED BY 'dolipass';
|
||||||
|
CREATE DATABASE IF NOT EXISTS dolibarr;
|
||||||
|
GRANT ALL PRIVILEGES on dolibarr.* TO 'dolibarr'@'localhost';
|
||||||
|
FLUSH PRIVILEGES;
|
@@ -1,4 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
apt-get install php8.2 php8.2-common php8.2-fpm -y # PHP
|
apt-get install nginx -y
|
||||||
apt-get install vim file bash-completion procps nginx screen git sudo less -y # Utils
|
apt-get install php8.2 php8.2-common php8.2-fpm php8.2-mbstring php8.2-gd php8.2-curl php8.2-xml php8.2-imap php8.2-zip php8.2-intl php8.2-mysql -y # PHP
|
||||||
|
#apt-get install vim file bash-completion procps nginx screen git sudo less -y # Utils
|
||||||
|
apt-get install git file sudo -y # Utils
|
||||||
apt-get install mariadb-client mariadb-server -y # MariaDB Server + Client
|
apt-get install mariadb-client mariadb-server -y # MariaDB Server + Client
|
||||||
|
18
dockerfile
18
dockerfile
@@ -1,16 +1,21 @@
|
|||||||
FROM debian:bookworm
|
FROM debian:bookworm
|
||||||
|
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||||
|
apt-get update && apt-get full-upgrade -y && apt-get install -y nginx php8.2 php8.2-common php8.2-fpm php8.2-mbstring php8.2-gd php8.2-curl php8.2-imap php8.2-zip php8.2-intl php8.2-mysql git file sudo less mariadb-client mariadb-server
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY app /app
|
COPY app /app
|
||||||
|
|
||||||
RUN apt-get update && apt-get full-upgrade -y && apt-get autoremove -y && apt-get autoclean -y
|
#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/sury-php-repo.sh
|
||||||
|
|
||||||
RUN /app/scripts/install-dependencies.sh
|
#RUN /app/scripts/install-dependencies.sh
|
||||||
|
|
||||||
RUN git clone --branch 21.0 --single-branch --depth 1 https://github.com/Dolibarr/dolibarr.git
|
#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 chown -R www-data:www-data /app/dolibarr
|
||||||
|
|
||||||
@@ -18,17 +23,20 @@ RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private
|
|||||||
|
|
||||||
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 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 /app/scripts/create_databases.sh
|
||||||
|
|
||||||
RUN mv /app/default /etc/nginx/sites-available/default
|
RUN mv /app/dolibarr.conf /etc/nginx/sites-available/dolibarr.conf && rm /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
ENV PORT=8080
|
ENV PORT=8080
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
#CMD ["/app/launch-daemons.sh"]
|
#CMD ["/app/launch-daemons.sh"]
|
||||||
|
VOLUME ["/mnt/dolibarr_vol"]
|
||||||
|
|
||||||
ENTRYPOINT ["/app/scripts/launch-daemons.sh"]
|
ENTRYPOINT ["/app/scripts/launch-daemons.sh"]
|
||||||
|
|
||||||
HEALTHCHECK --interval=5m --timeout=30s \
|
HEALTHCHECK --interval=5m --timeout=30s \
|
||||||
CMD /app/scripts/healthchecker.sh || exit 1
|
CMD /app/scripts/healthchecker.sh || exit 1
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user