Skip to content

Commit 2c0d1d4

Browse files
committed
improve service
1 parent 0b9dd85 commit 2c0d1d4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ jobs:
1111
runs-on: ubuntu-latest
1212
services:
1313
postgres:
14-
image: postgres:11
14+
image: postgres
1515
env:
1616
POSTGRES_USER: postgres
1717
POSTGRES_PASSWORD: postgres
18-
ports: [ "5432:5432" ]
18+
options: >-
19+
--health-cmd pg_isready
20+
--health-interval 10s
21+
--health-timeout 5s
22+
--health-retries 5
23+
ports:
24+
- 5432:5432
1925
steps:
2026
- name: Checkout Code
2127
uses: actions/checkout@v1

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ config :guardian_db, Guardian.DB.TestSupport.Repo,
1212
database: "guardian_db_test",
1313
pool: Ecto.Adapters.SQL.Sandbox,
1414
priv: "priv/temp/guardian_db_test",
15-
hostname: Map.get(System.get_env(), "DB_HOST", "localhost"),
15+
hostname: System.get_env("DB_HOST") || "localhost",
1616
username: "postgres",
1717
password: "postgres"

0 commit comments

Comments
 (0)