conteneurisation de l'appli
This commit is contained in:
53
containers/ethikTag/Dockerfile
Normal file
53
containers/ethikTag/Dockerfile
Normal file
@ -0,0 +1,53 @@
|
||||
FROM php:8.1-apache
|
||||
RUN a2enmod rewrite
|
||||
|
||||
|
||||
ARG PHP_VERSION="8.1"
|
||||
ENV PHP_VERSION $PHP_VERSION
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get update \
|
||||
&& apt-get -y upgrade \
|
||||
&& apt-get --no-install-recommends -yq install supervisor libicu-dev \
|
||||
libwebp-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev libzip-dev libxpm-dev \
|
||||
libfreetype6-dev \
|
||||
vim wget git \
|
||||
apache2
|
||||
|
||||
RUN docker-php-ext-install pdo pdo_mysql zip \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install intl
|
||||
|
||||
|
||||
RUN wget https://getcomposer.org/download/2.0.9/composer.phar \
|
||||
&& mv composer.phar /usr/bin/composer && chmod +x /usr/bin/composer
|
||||
|
||||
RUN wget -O- https://deb.nodesource.com/setup_18.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& npm install --global yarn
|
||||
|
||||
COPY apache.conf /etc/apache2/sites-enabled/000-default.conf
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
RUN wget -O- https://github.com/boxboat/fixuid/releases/download/v0.5.1/fixuid-0.5.1-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - \
|
||||
&& chown root:root /usr/local/bin/fixuid \
|
||||
&& chmod 4755 /usr/local/bin/fixuid \
|
||||
&& mkdir -p /etc/fixuid
|
||||
|
||||
COPY fixuid.yaml /etc/fixuid/config.yaml
|
||||
COPY supervisor.ini /etc/supervisor/supervisor.ini
|
||||
RUN chmod +x /etc/supervisor/supervisor.ini
|
||||
RUN chown www-data:www-data /etc/supervisor/supervisor.ini
|
||||
|
||||
COPY init.sh /init.sh
|
||||
RUN chmod +x /init.sh
|
||||
RUN chown www-data:www-data /init.sh
|
||||
ENTRYPOINT ["/usr/local/bin/fixuid"]
|
||||
|
||||
USER www-data
|
||||
CMD ["/init.sh"]
|
16
containers/ethikTag/apache.conf
Normal file
16
containers/ethikTag/apache.conf
Normal file
@ -0,0 +1,16 @@
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /var/www/public
|
||||
<Directory /var/www/public>
|
||||
AllowOverride None
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
</IfModule>
|
||||
</Directory>
|
||||
CustomLog /dev/stdout combined
|
||||
ErrorLog /dev/stderr
|
||||
</VirtualHost>
|
4
containers/ethikTag/fixuid.yaml
Normal file
4
containers/ethikTag/fixuid.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
user: www-data
|
||||
group: www-data
|
||||
paths:
|
||||
- /var/www/var
|
9
containers/ethikTag/init.sh
Normal file
9
containers/ethikTag/init.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo $(whoami)
|
||||
echo $(pwd)
|
||||
sleep 5
|
||||
bin/console d:s:u -f --complete
|
||||
bin/console d:f:l -n
|
||||
|
||||
/usr/bin/supervisord -c /etc/supervisor/supervisor.ini
|
12
containers/ethikTag/supervisor.ini
Normal file
12
containers/ethikTag/supervisor.ini
Normal file
@ -0,0 +1,12 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:apache2]
|
||||
environment=HOSTNAME="%(ENV_HOSTNAME)s"
|
||||
command = apache2ctl -D FOREGROUND
|
||||
user = www-data
|
||||
autostart = true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
0
containers/mariadb/init-db.d/init.sql
Normal file
0
containers/mariadb/init-db.d/init.sql
Normal file
Reference in New Issue
Block a user