Skip to content

Commit

Permalink
Fix PostgreSQL connection in GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
imankulov committed Sep 22, 2024
1 parent 60cd329 commit 7d8803a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions {{cookiecutter.project_slug}}/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
{%- endif %}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ALLOWED_HOSTS=*
# See the URL format in the documentation:
# https://django-environ.readthedocs.io/en/latest/#supported-types
{% if cookiecutter.database == "postgres" -%}
DATABASE_URL=psql://{{ cookiecutter.postgresql_user }}:{{ cookiecutter.postgresql_password }}@postgres:5432/{{ cookiecutter.postgresql_database }}
DATABASE_URL=psql://{{ cookiecutter.postgresql_user }}:{{ cookiecutter.postgresql_password }}@127.0.0.1:5432/{{ cookiecutter.postgresql_database }}
{% elif cookiecutter.database == "sqlite" -%}
DATABASE_URL=sqlite:///db.sqlite3
{% endif -%}
Expand Down

0 comments on commit 7d8803a

Please sign in to comment.