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

Almost working version + doc

parent f82c1976
Branches main
No related tags found
No related merge requests found
This is a docker image for running [Pretty Noemi CMS]()
This is a docker image for running [Pretty Noemi CMS](https://framagit.org/framasoft/PrettyNoemieCMS)
## Installation
```bash
cp .env.sample .env
docker-compose up
ln -s /var/lib/docker/volume/prettynoemie_sites/_data/ sites
```
## Add a site
### by copy
```bash
cp sites/framsite sites/mysite.fqdn
```
### From backup
```bash
cd sites
unzip mysite.fqdn.zip
```
### Set the reverse proxy
Adapt this file and add it to `/etc/apache2/sites-available/mysite.conf`
```apache2
<VirtualHost *:80>
ServerName mysite.fqdn
#ProxyVia On
#ProxyRequests On
ProxyPreserveHost on
Header set X-FRAMA-SITE mysite.fqdn
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
CustomLog ${APACHE_LOG_DIR}/mysite.tetras-libre.access.log combined
ErrorLog ${APACHE_LOG_DIR}/mysite-libre.error.log
</VirtualHost>
```
Finaly run `certbot` to use HTTPS
version: '2'
version: "3.7"
services:
front:
build: ./docker
volumes:
- 'noemie:/var/www/html/PrettyNoemieCMS'
- sites:/var/www/html/sites
environment:
restart: ${RESTART}
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
......@@ -14,4 +14,4 @@ services:
restart: ${RESTART}
volumes:
noemie:
sites:
......@@ -14,16 +14,16 @@ RUN apt-get update && apt-get install -y \
RUN docker-php-ext-install -j$(nproc) gd curl mbstring xml zip
COPY install_composer.sh /
COPY noemie.conf /etc/apache2/sites-available/
RUN a2dissite 000-default.conf
RUN a2ensite noemie.conf
RUN /bin/bash /install_composer.sh
RUN rm /install_composer.sh
#COPY noemie.conf /etc/apache2/sites-enabled/000-default.conf
WORKDIR /var/www/
RUN git clone https://framagit.org/framasoft/PrettyNoemieCMS html
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 chown -R www-data /var/www/html/
RUN a2enmod rewrite
<VirtualHost *:8000>
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/html">
Options -Indexes +FollowSymLinks +Includes
AllowOverride All
Order allow,deny
Allow from All
</Directory>
</VirtualHost>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment