https://github.com/lucasfrancaid/django-blog
Blog created using Python 3.11, Django 4, PostgreSQL and Docker!
https://github.com/lucasfrancaid/django-blog
bootstrap django docker docker-compose postgresql python
Last synced: 3 months ago
JSON representation
Blog created using Python 3.11, Django 4, PostgreSQL and Docker!
- Host: GitHub
- URL: https://github.com/lucasfrancaid/django-blog
- Owner: lucasfrancaid
- Created: 2020-03-30T22:50:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-02T21:55:27.000Z (over 2 years ago)
- Last Synced: 2025-04-02T22:22:15.288Z (over 1 year ago)
- Topics: bootstrap, django, docker, docker-compose, postgresql, python
- Language: Python
- Homepage:
- Size: 142 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django's Blog
Blog created using Django, PostgreSQL and Docker!
## Table of contents
* [About the Project](#about-the-project)
* [Built With](#built-with)
* [How to use](#how-to-use)
* [Contact](#contact)
## About the project
This project was created to learn more about Django with Docker.
### Built With
* [Python](https://www.python.org/)
* [Django](https://www.djangoproject.com/)
* [PostgreSQL](https://www.postgresql.org/)
* [Docker](https://www.docker.com/)
* [Docker Compose](https://docs.docker.com/compose/)
* [Bootstrap](https://getbootstrap.com/)
* [Poetry](https://python-poetry.org/)
## How to use
First, do you need clone this repository:
```bash
git clone https://github.com/lucasfrancaid/django-blog
```
In the repository root directory, run:
```bash
cp .env.dev .env
docker compose up --build -d
```
*Great, application is running on docker containers!*
Check: [http://localhost:8080](http://localhost:8080)
To apply migrations:
```bash
docker compose exec app poetry run python manage.py migrate
# docker exec django-blog-app-1 poetry run python manage.py migrate
```
To create the super user:
```bash
docker compose exec app poetry run python manage.py createsuperuser
# docker exec django-blog-app-1 poetry run python manage.py createsuperuser
```
To populate database with posts and authors:
```bash
docker compose exec app poetry run python manage.py loaddata blog/fixtures/posts.json
# docker exec django-blog-app-1 poetry run python manage.py loaddata blog/fixtures/posts.json
```
## Contact
Lucas França - https://www.linkedin.com/in/lucasfrancaid/