Compare commits
3 Commits
f550978e4a
...
d029fda896
Author | SHA1 | Date |
---|---|---|
Lukáš Kucharczyk | d029fda896 | |
Lukáš Kucharczyk | 9dead362c1 | |
Lukáš Kucharczyk | d81dba727b |
|
@ -6,7 +6,7 @@ RUN npm install && \
|
||||||
|
|
||||||
FROM python:3.10-slim-bullseye
|
FROM python:3.10-slim-bullseye
|
||||||
|
|
||||||
ENV VERSION_NUMBER 0.1.0-48-gdb5de81
|
ENV VERSION_NUMBER 0.1.0-51-g9dead36
|
||||||
ENV PROD 1
|
ENV PROD 1
|
||||||
|
|
||||||
RUN useradd --create-home --uid 1000 timetracker
|
RUN useradd --create-home --uid 1000 timetracker
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
version: "2.1"
|
||||||
|
services:
|
||||||
|
timetracker:
|
||||||
|
image: registry.kucharczyk.xyz/timetracker
|
||||||
|
build: Dockerfile
|
||||||
|
container_name: timetracker
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Prague
|
||||||
|
- CSRF_TRUSTED_ORIGINS="https://tracker.kucharczyk.xyz"
|
||||||
|
user: "1000"
|
||||||
|
# volumes:
|
||||||
|
# - "db:/home/timetracker/app/src/web/db.sqlite3"
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
restart: unless-stopped
|
|
@ -3,6 +3,9 @@
|
||||||
echo "Apply database migrations"
|
echo "Apply database migrations"
|
||||||
poetry run python src/web/manage.py migrate
|
poetry run python src/web/manage.py migrate
|
||||||
|
|
||||||
|
echo "Collect static files"
|
||||||
|
poetry run python src/web/manage.py collectstatic
|
||||||
|
|
||||||
# Start server
|
# Start server
|
||||||
echo "Starting server"
|
echo "Starting server"
|
||||||
poetry run python src/web/manage.py runserver 0.0.0.0:8000
|
poetry run python src/web/manage.py runserver 0.0.0.0:8000
|
|
@ -123,6 +123,7 @@ USE_TZ = True
|
||||||
# https://docs.djangoproject.com/en/4.1/howto/static-files/
|
# https://docs.djangoproject.com/en/4.1/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = "static/"
|
STATIC_URL = "static/"
|
||||||
|
STATIC_ROOT = BASE_DIR / "/static"
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
|
||||||
|
|
Loading…
Reference in New Issue