Compare commits

..

No commits in common. "0d20b543b0294dcf5ee160419ba780eaa9e3120e" and "2939b4a5156838bbb5b399ebe40df536e6fbb052" have entirely different histories.

6 changed files with 9 additions and 16 deletions

View File

@ -1 +0,0 @@
src/web/static/*

View File

@ -6,11 +6,10 @@ RUN npm install && \
FROM python:3.10.9-alpine
ENV VERSION_NUMBER 0.1.1-8-gf7b69f7
ENV VERSION_NUMBER 0.1.1-3-gd029fda
ENV PROD 1
RUN apk add \
bash \
vim \
curl \
caddy

View File

@ -1,3 +1,5 @@
.PHONY: createsuperuser shell cleanstatic
all: css migrate
initialize: npm css migrate sethookdir loadplatforms
@ -22,11 +24,8 @@ migrate: makemigrations
dev: migrate sethookdir
poetry run python src/web/manage.py runserver_plus
caddy:
caddy run --watch
dev-prod: migrate collectstatic sethookdir
cd src/web/; PROD=1 poetry run python -m gunicorn --bind 0.0.0.0:8001 web.asgi:application -k uvicorn.workers.UvicornWorker
cd src/web/; poetry run python -m gunicorn --bind 0.0.0.0:8001 web.asgi:application -k uvicorn.workers.UvicornWorker
dumptracker:
poetry run python src/web/manage.py dumpdata --format yaml tracker --output tracker_fixture.yaml

View File

@ -1,10 +1,9 @@
---
version: "2.1"
services:
timetracker:
image: registry.kucharczyk.xyz/timetracker
build:
context: .
dockerfile: Dockerfile
build: Dockerfile
container_name: timetracker
environment:
- TZ=Europe/Prague

View File

@ -8,6 +8,6 @@ echo "Collect static files"
poetry run python src/web/manage.py collectstatic
echo "Starting server"
caddy start
caddy run
cd src/web || exit
poetry run python -m gunicorn --bind 0.0.0.0:8001 web.asgi:application -k uvicorn.workers.UvicornWorker

View File

@ -16,13 +16,10 @@ Including another URLconf
from django.contrib import admin
from django.urls import include, path
from django.views.generic import RedirectView
from django.conf import settings
urlpatterns = [
path("admin/", admin.site.urls),
path("", RedirectView.as_view(url="/tracker/list-sessions")),
path("tracker/", include("tracker.urls")),
]
if settings.DEBUG:
urlpatterns.append(path("admin/", admin.site.urls))