diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..92002f3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM php:7.4.33-apache + +COPY . /website + +ENV APACHE_DOCUMENT_ROOT /website/home/public +RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf +RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf + +RUN a2enmod rewrite + +WORKDIR /website diff --git a/README.md b/README.md index 0e087a0..c00001d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,24 @@ This is the MAGLab website source code and a work in progress. Also, the readme is a work in progress. +## Development Setup + +Prerequisites +* Docker + +```bash +docker build -t maglaboratory/website . +docker run -p 8000:80 -v $(pwd):/website --name website --rm maglaboratory/website +``` + +Visit the home page at http://localhost:8000 + +To rebuild the site, run + +```bash +docker exec website php -f src/compile.php +``` + ## TODO * Write Deployment Instructions diff --git a/home/protected/maglab/app/views/board/add.php b/home/protected/maglab/app/views/board/add.php index 9c91c23..d56ce8c 100644 --- a/home/protected/maglab/app/views/board/add.php +++ b/home/protected/maglab/app/views/board/add.php @@ -14,7 +14,9 @@ - + +> +