Skip to content

Commit

Permalink
[conf][docs] Update test instructions
Browse files Browse the repository at this point in the history
Add missing or incorrect step to bootstrap, build, and test the latest
Postgres DB using compatible config with Docker-Compose or Podman
Compose.
  • Loading branch information
kianmeng authored and cpjolicoeur committed Sep 11, 2024
1 parent e9b2949 commit d677da2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,17 @@ end

First, you'll need to build the test database.

```elixir
MIX_ENV=test mix ecto.reset
```bash
MIX_ENV=test mix db.reset
```

This task assumes you have postgres installed and that the `postgres` user can create / drop databases. If you'd prefer to use a different user, you can specify it with the environment variable `SCRIVENER_ECTO_DB_USER`.
This task assumes you have Postgres installed and that the `postgres` user can create / drop databases. If you'd prefer to use a different user, you can specify it with the environment variable `SCRIVENER_ECTO_DB_USER`.

Alternatively, if you prefer to use Docker for database setup.

```bash
docker-compose up
```

With the database built, you can now run the tests.

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
db:
image: "postgres:13"
image: "docker.io/postgres:latest"
ports:
- "127.0.0.1:5432:5432"
environment:
Expand Down

0 comments on commit d677da2

Please sign in to comment.