first commit

This commit is contained in:
2025-04-09 20:38:48 +02:00
commit f8addc15f4
116 changed files with 17614 additions and 0 deletions

31
misc/docker/Dockerfile Normal file
View File

@ -0,0 +1,31 @@
FROM reg.cadoles.com/envole/nineapache:8.2
USER root
COPY ./misc/docker/apache.conf /etc/apache2/conf.d/nine/site.conf
RUN echo "* * * * * /app/bin/console app:Cron --env=prod" >> /var/spool/cron/crontabs/root
WORKDIR /app
COPY . .
# Installation des dépendances composer
RUN composer install --no-interaction
RUN mkdir -p /app/uploads
RUN mkdir -p /app/public/uploads
RUN mkdir -p /app/public/uploads/avatar
RUN mkdir -p /app/public/uploads/logo
RUN chown apache /app/uploads -R
RUN chown apache /app/public/uploads -R
RUN chmod u+w /app/public/uploads -R
RUN chmod u+w /app/uploads -R
RUN cp -rf /app/public/medias/logo /app/public/uploads/logo
RUN cp -rf /app/public/medias/avatar /app/public/uploads/avatar
RUN mkdir -p /app/var
RUN chown apache /app/var -R
RUN chmod u+w /app/var -R
CMD /app/misc/script/reconfigure.sh && /etc/apache2/apache2.sh

19
misc/docker/apache.conf Executable file
View File

@ -0,0 +1,19 @@
LoadModule rewrite_module modules/mod_rewrite.so
ServerName nineapache.local
DocumentRoot "/app/public"
Alias /ninewiki /app/public
<Directory "/app/public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</Directory>