Skip to content
Merged
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
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Ignore everything
**

# ... except for dependencies and source
!Pipfile
!Pipfile.lock

# these will need removed once in package setup
!assets/
!pages/
!templates/
!fastic.py
!config.py
!runtime.txt
!.env
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM python:3.7-slim

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1

COPY ./Pipfile /app/Pipfile
COPY ./Pipfile.lock /app/Pipfile.lock

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends gcc

RUN pip install pipenv
RUN pipenv install --dev

COPY . /app

# Run fastic
ENTRYPOINT ["pipenv", "run"]

CMD ["python", "fastic.py"]
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/app
environment:
FLASK_ENV: development
command: pipenv run python fastic.py
2 changes: 1 addition & 1 deletion fastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def run_dev():
server.watch('./templates', build_pages)
server.watch('./assets/sass', build_styles)
server.watch('./assets/js', build_js)
server.serve(root='build', port=5555)
server.serve(root='build', host="0.0.0.0", port=5000)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Fastic</title>
<title>Fastic - python static site generator</title>
<link rel="stylesheet" href="/assets/css/styles.css" type="text/css" />
</head>
<body>
Expand Down