Additional fixes
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
56e5dfaa03
commit
18e8f93261
|
@ -5,7 +5,7 @@
|
|||
|
||||
:8000 {
|
||||
handle_path /static/* {
|
||||
root * src/timetracker/static/
|
||||
root * static/
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
|
|
|
@ -2,7 +2,7 @@ FROM node as css
|
|||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN npm install && \
|
||||
npx tailwindcss -i ./src/input.css -o ./src/timetracker/games/static/base.css --minify
|
||||
npx tailwindcss -i ./common/input.css -o ./static/base.css --minify
|
||||
|
||||
FROM python:3.10.9-slim-bullseye
|
||||
|
||||
|
@ -26,7 +26,7 @@ RUN useradd -m --uid 1000 timetracker
|
|||
WORKDIR /home/timetracker/app
|
||||
COPY . /home/timetracker/app/
|
||||
RUN chown -R timetracker:timetracker /home/timetracker/app
|
||||
COPY --from=css /app/src/timetracker/games/static/base.css /home/timetracker/app/src/timetracker/games/static/base.css
|
||||
COPY --from=css ./app/static/base.css /home/timetracker/app/static/base.css
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
# Apply database migrations
|
||||
set -euo pipefail
|
||||
echo "Apply database migrations"
|
||||
poetry run python src/timetracker/manage.py migrate
|
||||
poetry run python manage.py migrate
|
||||
|
||||
echo "Collect static files"
|
||||
poetry run python src/timetracker/manage.py collectstatic --clear --no-input
|
||||
poetry run python manage.py collectstatic --clear --no-input
|
||||
|
||||
echo "Starting server"
|
||||
caddy start
|
||||
|
|
|
@ -85,7 +85,8 @@ def list_sessions(request, filter="", purchase_id="", platform_id="", game_id=""
|
|||
# cannot use dataset[0] here because that might be only partial QuerySet
|
||||
context["last"] = Session.objects.all().order_by("timestamp_start").last()
|
||||
# charts are always oldest->newest
|
||||
context["chart"] = playtime_over_time_chart(dataset.order_by("timestamp_start"))
|
||||
if Session.objects.count() >= 2:
|
||||
context["chart"] = playtime_over_time_chart(dataset.order_by("timestamp_start"))
|
||||
|
||||
return render(request, "list_sessions.html", context)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = {
|
||||
darkMode: 'class',
|
||||
content: ["./src/**/*.{html,js}"],
|
||||
content: ["./**/*.{html,js}"],
|
||||
theme: {
|
||||
fontFamily: {
|
||||
sans: ['Inter', 'sans-serif'],
|
||||
|
|
Loading…
Reference in New Issue