Files
mdshop/README.md
Ville Rantanen 62479844cf dokuwiki support
2023-11-30 09:08:14 +02:00

1.2 KiB

MDShop

A simple shopping list app:

  • Runs on gunicorn+flask (python3)
  • Dockerizes
  • Multi-user
  • Data saved as flat files, can contain markdown
  • Syntaxes parsed:
    • link -type links
    • and [x] tick boxes

Note! Register page is enabled by default, but there is no link to it anywhere.

  • Disable registering with env variable: ENABLE_REGISTER=false
  • MARKDOWN_STYLE=dokuwiki or markdown
    • markdown syntax, unticked = [ ], ticked = [x]
    • dokuwiki syntax (todo plugin), unticked = <todo>item</todo>, ticked = <todo #user>item</todo>
  • SECRET_KEY=somerandomstring
  • SESSION_COOKIE_NAME=name for cookies

Running

  • To debug, run with ./debug.py

  • To run with gunicorn and nginx:

  • start app: gunicorn -b 0.0.0.0:8000 -w 2 shop:app

  • Add in nginx config:

location /myshop/ {
                proxy_pass http://127.0.0.1:8000/;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Scheme $scheme;
                proxy_set_header X-Script-Name /myshop;
        }