An open API service indexing awesome lists of open source software.

https://github.com/j3rrryy/school_464

Modern school website. Written using Django
https://github.com/j3rrryy/school_464

certbot django docker nginx postgresql school-website

Last synced: 4 months ago
JSON representation

Modern school website. Written using Django

Awesome Lists containing this project

README

          

# School website



СI/CD


Codecov


Python 3.12


MIT License


Ruff


uv

## :book: Key features

- RSS
- PWA
- Dynamic menu
- Dynamic footer
- Supports XML maps
- Custom error pages
- In-memory caching
- Database - PostgreSQL
- Easy editing of HTML pages
- Version for the visually impaired
- Automatic conversion of images to WebP
- Automatic cleaning of unused media files

## :computer: Requirements

- Docker

## :hammer_and_wrench: Getting started

- Copy `.env` file from `examples/dev/` to `dev/` folder and fill it in

- **(For prod)** Copy `.env` file from `examples/prod/` to `prod/` folder and fill it in

- **(For prod)** Copy `nginx.conf` file from `examples/prod/` to `prod/` folder and fill it in

- **(For prod)** Copy `docker-compose.cert.yml` file from `examples/prod/` to `prod/` folder and fill it in

### :rocket: Start

- Run the **dev ver.**

```shell
docker compose -f docker-compose.dev.yml up --build -d
```

- Run the **prod ver.** and get a SSL certificate

- Create the directory on the server

```shell
mkdir -p ./school_464/
```

- Use SCP to copy the prod files to the server

```shell
scp -r ./prod/. @:./school_464/
```

- Run the deploy script

```shell
bash deploy.sh
```

### :construction_worker: Maintenance

- Create superuser

- Get access to the container

```shell
docker exec -it sh
```

- Use this command

```shell
uv run python manage.py createsuperuser
```

### :x: Stop

```shell
docker compose -f docker-compose..yml stop
```