Skip to content

Commit

Permalink
some guides and dockerfile updates
Browse files Browse the repository at this point in the history
  • Loading branch information
QuitoTactico committed Nov 15, 2024
1 parent cf897e2 commit 858e942
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions GUIDES AND RULES/upload_database.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#### EC2
docker ps
docker exec -it <container-name> /bin/bash

#### container
python manage.py dumpdata --settings=SoftServeAcademy.settings > data.json
python manage.py migrate --settings=SoftServeAcademy.settings_deployment
python manage.py shell --settings=SoftServeAcademy.settings_deployment

#### py console
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
exit()

#### container again
python manage.py loaddata data.json --settings=SoftServeAcademy.settings_deployment
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
web:
image: quitotactico/softserve-academy
command: ["sh", "/app/scripts/init.sh"]
command: ["sh", "/scripts/init.sh"]
environment:
- DJANGO_SETTINGS_MODULE=SoftServeAcademy.settings_deployment
depends_on:
Expand Down

0 comments on commit 858e942

Please sign in to comment.