Merge branch 'bvander/pelican-edits' into Ida/pelican docker added
This commit is contained in:
commit
864a3448eb
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ __pycache__
|
||||
*.o
|
||||
output/
|
||||
node_modules/
|
||||
.venv/
|
||||
|
19
Dockerfile
Normal file
19
Dockerfile
Normal 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
|
@ -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
25
nginx.conf
Normal 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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user