Blog created using Django, PostgreSQL and Docker!
This project was created to learn more about Django with Docker.
First, do you need clone this repository:
git clone https://github.com/lucasfrancaid/django-blog
In the repository root directory, run:
cp .env.dev .env
docker compose up --build -d
Great, application is running on docker containers! Check: http://localhost:8080
To apply migrations:
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:
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:
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
Lucas França - https://www.linkedin.com/in/lucasfrancaid/