Update URLs, Docker config, and Tailwind setup
Added static and media file serving and Silk profiling in Django URLs. Updated docker-compose to mount backend/frontend code, adjust commands, and switch to 'trznice' app references. Enhanced Tailwind config to extend default colors and import defaultTheme.
This commit is contained in:
@@ -16,6 +16,10 @@ Including another URLconf
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.conf.urls.static import static
|
||||
from django.conf import settings
|
||||
|
||||
from django import settings
|
||||
from .views import choices
|
||||
|
||||
from drf_spectacular.views import (
|
||||
@@ -45,4 +49,8 @@ urlpatterns = [
|
||||
path("api/payments/gopay/", include("thirdparty.gopay.urls", namespace="gopay")),
|
||||
path('api/zasilkovna/', include('thirdparty.zasilkovna.urls')),
|
||||
path('api/deutschepost/', include('thirdparty.deutschepost.urls')),
|
||||
]
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += [path('silk/', include('silk.urls', namespace='silk'))]
|
||||
|
||||
|
||||
0
backups/backup-20260126-155148.sql
Normal file
0
backups/backup-20260126-155148.sql
Normal file
0
backups/backup-20260127-192753.sql
Normal file
0
backups/backup-20260127-192753.sql
Normal file
@@ -13,13 +13,14 @@ services:
|
||||
- db
|
||||
- redis
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- static-data:/app/collectedstaticfiles
|
||||
- media-data:/app/media
|
||||
command: sh -c "
|
||||
python manage.py migrate --verbosity 3 --noinput &&
|
||||
python manage.py check &&
|
||||
python manage.py collectstatic --clear --noinput --verbosity 3 &&
|
||||
gunicorn -k uvicorn.workers.UvicornWorker vontor_cz.asgi:application --bind 0.0.0.0:8000"
|
||||
python manage.py migrate --noinput &&
|
||||
python manage.py collectstatic --clear --noinput &&
|
||||
python manage.py seed_app_config &&
|
||||
gunicorn -k uvicorn.workers.UvicornWorker trznice.asgi:application --bind 0.0.0.0:8000"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
@@ -55,10 +56,12 @@ services:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
command: sh -c "python manage.py migrate --noinput && celery -A vontor_cz worker --loglevel=info"
|
||||
command: celery -A trznice worker --loglevel=info
|
||||
restart: always
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
depends_on:
|
||||
- redis
|
||||
- db
|
||||
@@ -71,10 +74,12 @@ services:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
command: sh -c "python manage.py migrate --noinput && celery -A vontor_cz beat --loglevel=info"
|
||||
command: celery -A trznice beat --loglevel=info
|
||||
restart: always
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
depends_on:
|
||||
- redis
|
||||
- db
|
||||
@@ -92,13 +97,14 @@ services:
|
||||
env_file:
|
||||
- ./frontend/.env
|
||||
ports:
|
||||
# - 80:80
|
||||
- 9000:80
|
||||
- 80:80
|
||||
# - 9000:80
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- app_network
|
||||
volumes:
|
||||
- ./frontend/dist:/usr/share/nginx/html
|
||||
- static-data:/app/collectedstaticfiles # static (Django)
|
||||
- media-data:/app/media # media (Django)
|
||||
- ./frontend/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import defaultTheme from 'tailwindcss/defaultTheme'
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
content: [
|
||||
@@ -18,6 +20,9 @@ export default {
|
||||
brandGlass: 'linear-gradient(180deg, color-mix(in hsl, var(--c-background-light), transparent 30%), color-mix(in hsl, black, transparent 70%))'
|
||||
},
|
||||
colors: {
|
||||
// Keep all default Tailwind colors (including yellow)
|
||||
...defaultTheme.colors,
|
||||
// Add your custom brand colors
|
||||
brand: {
|
||||
bg: 'var(--c-background)',
|
||||
bgLight: 'var(--c-background-light)',
|
||||
|
||||
Reference in New Issue
Block a user