Compare commits

..

No commits in common. "8faf73adc10600edc439158a48cc29f27e14c75f" and "bf42e13626b849108c9425cff7b041ef4747fdd9" have entirely different histories.

5 changed files with 4 additions and 28 deletions

View File

@ -1,5 +0,0 @@
SECRET_KEY=your_secret_key
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_ROOT_PASSWORD=your_db_root_password

View File

@ -88,8 +88,8 @@ DATABASES = {
'NAME': os.getenv('DB_NAME'), 'NAME': os.getenv('DB_NAME'),
'USER': os.getenv('DB_USER'), 'USER': os.getenv('DB_USER'),
'PASSWORD': os.getenv('DB_PASSWORD'), 'PASSWORD': os.getenv('DB_PASSWORD'),
'HOST': 'db', 'HOST': os.getenv('DB_HOST'),
'PORT': '3306', 'PORT': os.getenv('DB_PORT'),
} }
} }

View File

@ -1,5 +1,5 @@
# Use an official Python runtime as a parent image # Use an official Python runtime as a parent image
FROM python:3.13-slim-trixie FROM python:3.11-slim-bookworm
# Set environment variables # Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONDONTWRITEBYTECODE=1

View File

@ -1,34 +1,15 @@
services: services:
db:
image: mariadb:12.2
env_file:
- .env
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- mariadb_data:/var/lib/mysql
restart: unless-stopped
django: django:
build: . build: .
env_file: env_file:
- .env - .env
volumes: volumes:
- .:/app - .:/app
restart: unless-stopped
ports: ports:
- "3030:3030" - "3030:3030"
depends_on: network_mode: "host"
- db
command: > command: >
sh -c "python manage.py makemigrations blog --noinput && sh -c "python manage.py makemigrations blog --noinput &&
python manage.py migrate --noinput && python manage.py migrate --noinput &&
python manage.py collectstatic --noinput && python manage.py collectstatic --noinput &&
gunicorn BH.wsgi:application --bind 0.0.0.0:3030 --workers ${GUNICORN_WORKERS:-3}" gunicorn BH.wsgi:application --bind 0.0.0.0:3030 --workers ${GUNICORN_WORKERS:-3}"
volumes:
mariadb_data:

Binary file not shown.