Skip to content
Snippets Groups Projects
Verified Commit f82c1976 authored by David Beniamine's avatar David Beniamine
Browse files

Pretty Noemie image building

TODO :

+ manage multiple sites
+ import sites procedure
parent 3f6eedec
Branches
No related tags found
No related merge requests found
# Docker
PORT=8000
RESTART=no
.env
.sw?
html/*
version: '2'
services:
front:
build: ./docker
volumes:
- 'noemie:/var/www/html/PrettyNoemieCMS'
environment:
restart: ${RESTART}
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
ports:
- "${PORT}:80"
restart: ${RESTART}
volumes:
noemie:
FROM php:7.3-apache
RUN apt-get update && apt-get install -y \
curl \
git \
libcurl4-gnutls-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libxml2-dev \
libzip-dev \
wget
RUN docker-php-ext-install -j$(nproc) gd curl mbstring xml zip
COPY install_composer.sh /
RUN /bin/bash /install_composer.sh
RUN rm /install_composer.sh
#COPY noemie.conf /etc/apache2/sites-enabled/000-default.conf
WORKDIR /var/www/html
RUN git clone https://framagit.org/framasoft/PrettyNoemieCMS
WORKDIR /var/www/html/PrettyNoemieCMS
RUN /usr/local/bin/composer.phar install
RUN chown -R www-data /var/www/html/PrettyNoemieCMS
WORKDIR /var/www/html
RUN a2enmod rewrite
#!/bin/sh
EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');" 2>/dev/null)"
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
echo "Expected $EXPECTED_SIGNATURE"
echo "Got $ACTUAL_SIGNATURE"
rm composer-setup.php
exit 1
fi
php composer-setup.php --install-dir=/usr/local/bin
RESULT=$?
rm composer-setup.php
exit $RESULT
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment