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.contrib import admin
|
||||||
from django.urls import path, include
|
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 .views import choices
|
||||||
|
|
||||||
from drf_spectacular.views import (
|
from drf_spectacular.views import (
|
||||||
@@ -45,4 +49,8 @@ urlpatterns = [
|
|||||||
path("api/payments/gopay/", include("thirdparty.gopay.urls", namespace="gopay")),
|
path("api/payments/gopay/", include("thirdparty.gopay.urls", namespace="gopay")),
|
||||||
path('api/zasilkovna/', include('thirdparty.zasilkovna.urls')),
|
path('api/zasilkovna/', include('thirdparty.zasilkovna.urls')),
|
||||||
path('api/deutschepost/', include('thirdparty.deutschepost.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
|
- db
|
||||||
- redis
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./backend:/app
|
||||||
- static-data:/app/collectedstaticfiles
|
- static-data:/app/collectedstaticfiles
|
||||||
- media-data:/app/media
|
- media-data:/app/media
|
||||||
command: sh -c "
|
command: sh -c "
|
||||||
python manage.py migrate --verbosity 3 --noinput &&
|
python manage.py migrate --noinput &&
|
||||||
python manage.py check &&
|
python manage.py collectstatic --clear --noinput &&
|
||||||
python manage.py collectstatic --clear --noinput --verbosity 3 &&
|
python manage.py seed_app_config &&
|
||||||
gunicorn -k uvicorn.workers.UvicornWorker vontor_cz.asgi:application --bind 0.0.0.0:8000"
|
gunicorn -k uvicorn.workers.UvicornWorker trznice.asgi:application --bind 0.0.0.0:8000"
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|
||||||
@@ -55,10 +56,12 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
dockerfile: Dockerfile
|
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
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- ./backend/.env
|
- ./backend/.env
|
||||||
|
volumes:
|
||||||
|
- ./backend:/app
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- db
|
- db
|
||||||
@@ -71,10 +74,12 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
dockerfile: Dockerfile
|
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
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- ./backend/.env
|
- ./backend/.env
|
||||||
|
volumes:
|
||||||
|
- ./backend:/app
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- db
|
- db
|
||||||
@@ -92,13 +97,14 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ./frontend/.env
|
- ./frontend/.env
|
||||||
ports:
|
ports:
|
||||||
# - 80:80
|
- 80:80
|
||||||
- 9000:80
|
# - 9000:80
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
networks:
|
networks:
|
||||||
- app_network
|
- app_network
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./frontend/dist:/usr/share/nginx/html
|
||||||
- static-data:/app/collectedstaticfiles # static (Django)
|
- static-data:/app/collectedstaticfiles # static (Django)
|
||||||
- media-data:/app/media # media (Django)
|
- media-data:/app/media # media (Django)
|
||||||
- ./frontend/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./frontend/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import defaultTheme from 'tailwindcss/defaultTheme'
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
content: [
|
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%))'
|
brandGlass: 'linear-gradient(180deg, color-mix(in hsl, var(--c-background-light), transparent 30%), color-mix(in hsl, black, transparent 70%))'
|
||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
|
// Keep all default Tailwind colors (including yellow)
|
||||||
|
...defaultTheme.colors,
|
||||||
|
// Add your custom brand colors
|
||||||
brand: {
|
brand: {
|
||||||
bg: 'var(--c-background)',
|
bg: 'var(--c-background)',
|
||||||
bgLight: 'var(--c-background-light)',
|
bgLight: 'var(--c-background-light)',
|
||||||
|
|||||||
Reference in New Issue
Block a user