Merge branch 'bvander/pelican-edits' into Ida/pelican docker added

This commit is contained in:
Idaapayo 2021-09-17 16:29:38 +03:00
commit 864a3448eb
4 changed files with 45 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ __pycache__
*.o
output/
node_modules/
.venv/

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM python:3.9.7-slim-buster as build
WORKDIR /app
RUN apt-get update && apt-get install make
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
RUN make publish
FROM openresty/openresty:buster-fat
COPY --from=build /app/output /var/www/pelican/output/
COPY nginx.conf /etc/nginx/conf.d/default.conf

View File

@ -5,8 +5,6 @@ A static website built with pelican.
## INSTRUCTIONS ON HOW TO BUILD
```angular2html
git clone git@gitlab.com:grassrootseconomics/pelican-website-ge.git
git checkout Ida/pelican
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt

25
nginx.conf Normal file
View File

@ -0,0 +1,25 @@
server {
listen [::]:80;
listen 80;
server_name localhost;
root /var/www/pelican/output;
location = / {
rewrite ^ /index.html;
}
location / {
gzip_static on;
try_files $uri.htm $uri.html $uri =404;
}
location = /favicon.ico {
expires max;
}
location ^~ /theme {
expires 1y;
}
}