FireEndymion235 / Teyvatedu

The Teyvat Education Press code repo for public website.
Apache License 2.0
3 stars 1 forks source link

The Teyvat Educational Press official website

This repo is the official website repo, dedicated to building a standardized player community

中文README

Overall structure

  1. Home page
  2. Publications
  3. Notifications
  4. Products
  5. Contact us/About us
  6. Login page

Install

Docker build:

    docker build -t teyvatedu .

prechecks:

cd src
mkdir -p /usr/tep/static /usr/tep/templates /usr/tep/sqlite3 /usr/tep/logs
cp -r ./static/* /usr/tep/static
cp -r ./templates/* /usr/tep/templates
cp -r ./sqlite3/* /usr/tep/sqlite3
cp -r ./logs/* /usr/tep/logs

Docker run:

    docker run -d -p 80:80 \
    --name teyvatedu \
    -v /usr/tep/static:/app/static \
    -v /usr/tep/templates:/app/templates \
    -v /usr/tep/sqlite3:/app/sqlite3 \
    -v /usr/tep/logs:/app/logs \
    teyvatedu

Generate JWT_SECRET_KEY:

tr -dc 'A-Z0-9' < /dev/urandom | head -c 64

replace JWT_SECRET_KEY with the generated key.

local deploy:

uvicorn main:app --host=0.0.0.0 --port=8000 --lifespan=on --env-file=.env --log-config=uvicorn_log.yaml

Credits

This project includes code from Editorial by HTML5 UP by [@ajlkn], used under CC BY 3.0. Changes were made to the original code.

Last modified: 2024-7-2