~kvikshaug/kvikshaug.no

f942aaa6ba615f7c1070470865e4b6b3bfb60cdc — Ali Kaafarani 2 years ago b5cbf9b
Serve static assets in development through flask
2 files changed, 5 insertions(+), 10 deletions(-)

M docker-compose.yml
M src/kvikshaug/app.py
M docker-compose.yml => docker-compose.yml +2 -9
@@ 1,16 1,9 @@
services:
  nginx:
    image: nginx:1.21
    ports:
      - "8000:80"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./assets:/assets:ro
      - ./.well-known:/.well-known:ro

  web:
    build: .
    image: kvikshaug.no
    ports:
      - "8000:8000"
    networks:
      default:
        aliases:

M src/kvikshaug/app.py => src/kvikshaug/app.py +3 -1
@@ 4,7 4,9 @@ from jinja2 import StrictUndefined
from .settings import Configuration


app = Flask("kvikshaug", template_folder="../../templates")
app = Flask(
    "kvikshaug", template_folder="../../templates", static_folder="../../assets"
)
app.config.from_object(Configuration)
if app.config["DEBUG"]:
    # Be strict during development; forgiving in production.