forked from sylvain/hubzilla
Actualiser dockerfile
This commit is contained in:
16
dockerfile
16
dockerfile
@@ -20,7 +20,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|||||||
# Générer un certificat SSL auto-signé
|
# Générer un certificat SSL auto-signé
|
||||||
RUN mkdir -p /etc/ssl/private && mkdir -p /etc/ssl/certs && \
|
RUN mkdir -p /etc/ssl/private && mkdir -p /etc/ssl/certs && \
|
||||||
openssl req -x509 -nodes -subj "/C=FR/ST=France/L=Paris/O=organization/OU=Org/CN=${DOMAIN}" \
|
openssl req -x509 -nodes -subj "/C=FR/ST=France/L=Paris/O=organization/OU=Org/CN=${DOMAIN}" \
|
||||||
-newkey rsa:4096 -keyout /etc/ssl/private/${DOMAIN}.key -out /etc/ssl/certs/${DOMAIN}.crt -days 365
|
-newkey rsa:4096 -keyout /etc/ssl/private/${DOMAIN}.key -out /etc/ssl/certs/${DOMAIN}.crt -days 365
|
||||||
|
|
||||||
# Copier et activer la config Apache
|
# Copier et activer la config Apache
|
||||||
COPY src/container_apache.conf /etc/apache2/sites-available/${DOMAIN}.conf
|
COPY src/container_apache.conf /etc/apache2/sites-available/${DOMAIN}.conf
|
||||||
@@ -29,8 +29,12 @@ RUN sed -i "s/{{DOMAIN}}/${DOMAIN}/g" /etc/apache2/sites-available/${DOMAIN}.con
|
|||||||
|
|
||||||
# Installer Hubzilla
|
# Installer Hubzilla
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
RUN git clone https://framagit.org/hubzilla/core.git . && \
|
RUN rm -rf /var/www/html/* && \
|
||||||
util/add_addon_repo https://framagit.org/hubzilla/addons.git official && \
|
git clone https://framagit.org/hubzilla/core.git . && \
|
||||||
|
util/add_addon_repo https://framagit.org/hubzilla/addons.git official && \
|
||||||
|
mkdir -p /var/www/html/store/[data]/smarty3 && \
|
||||||
|
chown -R www-data:www-data /var/www/html/
|
||||||
|
|
||||||
|
|
||||||
mkdir -p /var/www/html/store/[data]/smarty3 && chown -R www-data:www-data /var/www/html/
|
mkdir -p /var/www/html/store/[data]/smarty3 && chown -R www-data:www-data /var/www/html/
|
||||||
|
|
||||||
@@ -38,7 +42,7 @@ mkdir -p /var/www/html/store/[data]/smarty3 && chown -R www-data:www-data /var/w
|
|||||||
COPY src/msmtprc /etc/msmtprc
|
COPY src/msmtprc /etc/msmtprc
|
||||||
RUN sed -i "s/{{SMTP_EMAIL}}/${SMTP_EMAIL}/g" /etc/msmtprc && sed -i "s/{{SMTP_SERVER}}/${SMTP_SERVER}/g" /etc/msmtprc && \
|
RUN sed -i "s/{{SMTP_EMAIL}}/${SMTP_EMAIL}/g" /etc/msmtprc && sed -i "s/{{SMTP_SERVER}}/${SMTP_SERVER}/g" /etc/msmtprc && \
|
||||||
sed -i "s/{{SMTP_PORT}}/${SMTP_PORT}/g" /etc/msmtprc && sed -i "s/{{SMTP_USER}}/${SMTP_USER}/g" /etc/msmtprc && \
|
sed -i "s/{{SMTP_PORT}}/${SMTP_PORT}/g" /etc/msmtprc && sed -i "s/{{SMTP_USER}}/${SMTP_USER}/g" /etc/msmtprc && \
|
||||||
sed -i "s/{{SMTP_PASS}}/${SMTP_PASS}/g" /etc/msmtprc
|
sed -i "s/{{SMTP_PASS}}/${SMTP_PASS}/g" /etc/msmtprc
|
||||||
|
|
||||||
RUN chmod 600 /etc/msmtprc && chown www-data:www-data /etc/msmtprc
|
RUN chmod 600 /etc/msmtprc && chown www-data:www-data /etc/msmtprc
|
||||||
RUN echo "sendmail_path = /usr/bin/msmtp -t" >> /etc/php/8.2/apache2/php.ini
|
RUN echo "sendmail_path = /usr/bin/msmtp -t" >> /etc/php/8.2/apache2/php.ini
|
||||||
@@ -47,8 +51,8 @@ RUN echo "sendmail_path = /usr/bin/msmtp -t" >> /etc/php/8.2/apache2/php.ini
|
|||||||
COPY src/.htconfig.php /var/www/html/.htconfig.php
|
COPY src/.htconfig.php /var/www/html/.htconfig.php
|
||||||
RUN LOCATION_HASH=$(cat /dev/urandom | tr -dc 'a-f0-9' | fold -w 64 | head -n 1) && \
|
RUN LOCATION_HASH=$(cat /dev/urandom | tr -dc 'a-f0-9' | fold -w 64 | head -n 1) && \
|
||||||
sed -i "s/{{DOMAIN}}/${DOMAIN}/g" /var/www/html/.htconfig.php && \
|
sed -i "s/{{DOMAIN}}/${DOMAIN}/g" /var/www/html/.htconfig.php && \
|
||||||
sed -i "s/{{LOCATION_HASH}}/${LOCATION_HASH}/g" /var/www/html/.htconfig.php && \
|
sed -i "s/{{LOCATION_HASH}}/${LOCATION_HASH}/g" /var/www/html/.htconfig.php && \
|
||||||
sed -i "s/{{ADMIN_EMAIL}}/${ADMIN_EMAIL}/g" /var/www/html/.htconfig.php
|
sed -i "s/{{ADMIN_EMAIL}}/${ADMIN_EMAIL}/g" /var/www/html/.htconfig.php
|
||||||
|
|
||||||
# Cron
|
# Cron
|
||||||
RUN echo "*/15 * * * * cd /var/www/html; /usr/bin/php Zotlabs/Daemon/Master.php Cron" | crontab -u www-data -
|
RUN echo "*/15 * * * * cd /var/www/html; /usr/bin/php Zotlabs/Daemon/Master.php Cron" | crontab -u www-data -
|
||||||
|
|||||||
Reference in New Issue
Block a user