Skip to content

Commit

Permalink
added POSTGRES_PASSWORD to .env.sample
Browse files Browse the repository at this point in the history
  • Loading branch information
asim3 committed May 22, 2024
1 parent a5423b1 commit c5cd3f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ init:
@./setup/set-new-django-project.bash


run:
docker compose up --build --remove-orphans


check:
${DOCKER_RUN} "python3 manage.py check --deploy \
--settings ${PROJECT_NAME}.settings.docker_production \
--fail-level ERROR \
&& echo 'production settings looks good'"
# ${DOCKER_RUN} "mkdir -p ./media/backup"
# ${DOCKER_RUN} "cp ./db.sqlite3 ./media/backup/db_$$(date +'%Y-%m-%d_%H-%M-%S').sqlite3"


# make test args=my_app
tests: check
${DOCKER_RUN} "python3 manage.py test ${args};"
Expand All @@ -32,29 +45,16 @@ tra:
${DOCKER_RUN} "python3 manage.py compilemessages"


run:
docker compose up --build --remove-orphans


make_migrations:
migrations:
${DOCKER_RUN} "python3 manage.py makemigrations --dry-run"
${DOCKER_RUN} "python3 manage.py makemigrations"
- ${DOCKER_RUN} "python3 manage.py generateschema --file ./templates/api/openapi-schema.yaml"


shell:
${DOCKER_RUN} "python3 manage.py shell"


# make data-migrations app=my_app
data-migrations:
${DOCKER_RUN} "python3 manage.py makemigrations --empty ${app}"


check:
${DOCKER_RUN} "python3 manage.py check --deploy \
--settings ${PROJECT_NAME}.settings.production \
--fail-level WARNING \
&& echo 'production settings looks good'"
${DOCKER_RUN} "mkdir -p ./media/backup"
- ${DOCKER_RUN} "cp ./db.sqlite3 ./media/backup/db_$$(date +'%Y-%m-%d_%H-%M-%S').sqlite3"
shell:
${DOCKER_RUN} "python3 manage.py shell"
1 change: 1 addition & 0 deletions setup/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ DJANGO_DEBUG=True
DJANGO_SECRET_KEY="abcdefghijklmnopqrstuvwxyz0123456789!@%^&*(-_=+)50"
REST_SIGNING_KEY=rest-top-secret
DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost
POSTGRES_PASSWORD=pass_pg

0 comments on commit c5cd3f7

Please sign in to comment.