dockerisation app
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit

This commit is contained in:
2024-06-30 12:06:40 +02:00
parent a59fe6372b
commit f659e27ad6
23 changed files with 892 additions and 717 deletions

22
misc/docker/Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM reg.cadoles.com/envole/nineapache:8.1
RUN echo "* * * * * /app/bin/console app:Cron --env=prod" >> /var/spool/cron/crontabs/root
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn encore dev
RUN yarn encore prod
RUN mkdir -p /app/public/uploads
RUN chown apache /app/public/uploads -R
RUN chmod u+w /app/public/uploads -R
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
#CMD /etc/apache2/apache2.sh

17
misc/script/reconfigure.sh Executable file
View File

@ -0,0 +1,17 @@
#!/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)
# Installation des dépendances composer
composer install --no-interaction
bin/console d:s:u --force --complete
bin/console app:Init
exec $@