mirror of
https://github.com/EDeev/deev.space.git
synced 2026-10-07 20:49:59 +03:00
Compare commits
No commits in common. "main" and "v2.0.0" have entirely different histories.
5 changed files with 13 additions and 8 deletions
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
|
|
@ -19,11 +19,17 @@ jobs:
|
|||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: dcr.deev.su
|
||||
username: ${{ secrets.ZOT_USERNAME }}
|
||||
password: ${{ secrets.ZOT_PASSWORD }}
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/edeev/deev.space
|
||||
dcr.deev.su/edeev/deev.space
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ docker compose exec web python manage.py createsuperuser
|
|||
```
|
||||
|
||||
The site runs at `http://localhost:8000`, the admin at `/admin/`. Prebuilt image:
|
||||
`docker pull ghcr.io/edeev/deev.space` or `docker pull git.deev.su/edeev/deev.space`.
|
||||
`docker pull ghcr.io/edeev/deev.space` or `docker pull dcr.deev.su/edeev/deev.space`.
|
||||
|
||||
## Installing without Docker
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ ratings and comments, and an anonymous visitor middleware. Details (in Russian):
|
|||
[deev.space](https://deev.space) runs on a VPS: gunicorn under a dedicated user behind nginx with a
|
||||
Let's Encrypt certificate; nginx serves static files and uploads. Prometheus monitors availability and
|
||||
certificate expiry. GitHub Actions builds the Docker image on every `v*` tag and publishes it to GitHub
|
||||
Packages and to the `git.deev.su` registry.
|
||||
Packages and to the `dcr.deev.su` registry.
|
||||
|
||||
## Development
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ docker compose exec web python manage.py createsuperuser
|
|||
```
|
||||
|
||||
Сайт откроется на `http://localhost:8000`, админка — на `/admin/`. Готовый образ:
|
||||
`docker pull ghcr.io/edeev/deev.space` или `docker pull git.deev.su/edeev/deev.space`.
|
||||
`docker pull ghcr.io/edeev/deev.space` или `docker pull dcr.deev.su/edeev/deev.space`.
|
||||
|
||||
## Установка без Docker
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ flowchart LR
|
|||
[deev.space](https://deev.space) работает на VPS: gunicorn под отдельным пользователем за nginx с
|
||||
сертификатом Let's Encrypt, статика и загрузки отдаются nginx. Доступность и срок сертификата
|
||||
отслеживает Prometheus. Docker-образ собирает GitHub Actions на каждый тег `v*` и публикует в GitHub
|
||||
Packages и в реестр `git.deev.su`.
|
||||
Packages и в реестр `dcr.deev.su`.
|
||||
|
||||
## Разработка
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ docker compose exec web python manage.py createsuperuser
|
|||
|
||||
```bash
|
||||
docker pull ghcr.io/edeev/deev.space:latest
|
||||
docker pull git.deev.su/edeev/deev.space:latest
|
||||
docker pull dcr.deev.su/edeev/deev.space:latest
|
||||
```
|
||||
|
||||
За обратным прокси укажите домены в `DJANGO_ALLOWED_HOSTS` и `DJANGO_CSRF_TRUSTED_ORIGINS`, а
|
||||
|
|
|
|||
|
|
@ -9,12 +9,11 @@ load_dotenv()
|
|||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
DEV_SECRET_KEY = 'django-insecure-dev-only-change-me' # noqa: S105 — заглушка только для разработки
|
||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', DEV_SECRET_KEY)
|
||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'django-insecure-dev-only-change-me')
|
||||
|
||||
DEBUG = os.environ.get('DJANGO_DEBUG', 'False') == 'True'
|
||||
|
||||
if not DEBUG and SECRET_KEY == DEV_SECRET_KEY:
|
||||
if not DEBUG and SECRET_KEY.startswith('django-insecure'):
|
||||
raise ImproperlyConfigured('Задайте DJANGO_SECRET_KEY для запуска с DJANGO_DEBUG=False')
|
||||
|
||||
ALLOWED_HOSTS = os.environ.get(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue