Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down