added container
parent
45d8729f84
commit
28b575b35a
|
@ -0,0 +1,31 @@
|
|||
# .gitignore
|
||||
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*.pyo
|
||||
*.pyd
|
||||
*.so
|
||||
*.log
|
||||
*.egg-info/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# Django
|
||||
*.sqlite3
|
||||
*.db
|
||||
*.db.sql
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
|
||||
# IDEs
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
*.swn
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
Thumbs.db
|
|
@ -0,0 +1,21 @@
|
|||
# Dockerfile
|
||||
# Pull the base image
|
||||
FROM python:3.10
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
# Set work directory
|
||||
WORKDIR /code
|
||||
|
||||
# Install dependencies
|
||||
COPY requirements.txt /code/
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copy project
|
||||
COPY . /code/
|
||||
|
||||
# Run migrations
|
||||
RUN python manage.py makemigrations
|
||||
RUN python manage.py migrate
|
|
@ -0,0 +1,13 @@
|
|||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
command: python manage.py runserver 0.0.0.0:${PORT}
|
||||
volumes:
|
||||
- .:/code
|
||||
ports:
|
||||
- ${PORT}:${PORT}
|
||||
env_file:
|
||||
- .env
|
|
@ -70,7 +70,7 @@
|
|||
<a href="{{ product.get_absolute_url }}" style="text-decoration: none; color: #212529;">
|
||||
<h5 class="card-title">{{ product.name }}</h5>
|
||||
</a>
|
||||
<p class="card-text text-truncate">{{ product.description }}</p>
|
||||
<p class="card-text text-truncate description">{{ product.description }}</p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p><strong>{{ product.price }}₸</strong></p>
|
||||
</div>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<div class="product-details">
|
||||
<h1 class="product-name" style="color: #ffffff;">{{ product.name }}</h1>
|
||||
<p class="price" style="font-size: 35px; font-weight: bold; color: rgba(255,128,0,0.73);">₸{{ product.price }}</p>
|
||||
<p class="description" style="font-size: 800px;">{{ product.description|linebreaks }}</p>
|
||||
<p class="description">{{ product.description|linebreaks }}</p>
|
||||
<a href="{% url 'index' %}" class="btn btn-primary">Вернуться на главную</a>
|
||||
|
||||
|
||||
|
@ -124,8 +124,7 @@
|
|||
margin-bottom: 19px;
|
||||
}
|
||||
.description {
|
||||
font-size: 800px !important;
|
||||
color: white !important; /* Замените #yourDesiredColor на желаемый цвет */
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue