-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PostGres DB for Action workflow (#16)
* Update django.yml * Update django.yml * Update django.yml * Use PostGres in workflows * Update django.yml * Update django.yml * Update django.yml * Update django.yml
- Loading branch information
1 parent
1283418
commit 4c2f25c
Showing
1 changed file
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,21 @@ jobs: | |
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
image: postgres | ||
# Provide the password for postgres | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: chatdb | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps tcp port 5432 on service container to the host | ||
- 5432:5432 | ||
env: | ||
PSQL_PASS: 12345 | ||
PSQL_USER: user | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
|
@@ -40,6 +49,12 @@ jobs: | |
DJANGO_SUPERUSER_PASSWORD: admin | ||
DJANGO_SUPERUSER_USERNAME: admin | ||
DJANGO_SUPERUSER_EMAIL: [email protected] | ||
DJANGO_SETTINGS_MODULE: django_channel_tutorial.production | ||
PSQL_NAME: chatdb | ||
PSQL_HOST: 127.0.0.1 | ||
PSQL_PORT: 5432 | ||
PSQL_USER: postgres | ||
PSQL_PASS: postgres | ||
run: | | ||
python manage.py migrate | ||
python manage.py createsuperuser --no-input | ||
|