first commit
This commit is contained in:
31
misc/docker/Dockerfile
Normal file
31
misc/docker/Dockerfile
Normal 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
19
misc/docker/apache.conf
Executable 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>
|
13
misc/script/reconfigure.sh
Executable file
13
misc/script/reconfigure.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
# Se positionner sur la racine du projet
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd ${DIR}
|
||||
cd ../..
|
||||
DIR=$(pwd)
|
||||
|
||||
bin/console d:s:u --force --complete
|
||||
bin/console app:init
|
||||
|
||||
exec $@
|
Reference in New Issue
Block a user