Skip to content

Commit 0c0d745

Browse files
authored
ci: rm explicit container name & obsolete version attr (#2120)
## What kind of change does this PR introduce? Having explicit `container_name` defined in the docker compose prevents utilizing [git worktrees](https://git-scm.com/docs/git-worktree). By removing, each container name will be prefixed with the current working directory, hence preventing any name collisions. Also removing the `version` attribute per the warning: ``` the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion ```
1 parent 747bf3b commit 0c0d745

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ docker-compose -f docker-compose-dev.yml build postgres
122122
docker-compose -f docker-compose-dev.yml up postgres
123123
```
124124

125-
You should then see in Docker that `auth_postgresql` is running on `port: 5432`.
125+
You should then see in Docker that `auth-postgres-1` is running on `port: 5432`.
126126

127127
> **Important** If you happen to already have a local running instance of Postgres running on the port `5432` because you
128128
> may have installed via [homebrew on macOS](https://formulae.brew.sh/formula/postgresql) then be certain to stop the process using:
@@ -461,17 +461,12 @@ export GOTRUE_DB_DATABASE_URL="postgres://supabase_auth_admin:root@localhost:743
461461

462462
## Helpful Docker Commands
463463

464-
```
465-
// file: docker-compose-dev.yml
466-
container_name: auth_postgres
467-
```
468-
469464
```zsh
470465
# Command line into bash on the PostgreSQL container
471-
docker exec -it auth_postgres bash
466+
docker exec -it auth-postgres-1 bash
472467

473468
# Removes Container
474-
docker container rm -f auth_postgres
469+
docker container rm -f auth-postgres-1
475470

476471
# Removes volume
477472
docker volume rm postgres_data

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Create a `.env.docker` file to store your own custom env vars. See [`example.doc
4343

4444
1. `make build`
4545
2. `make dev`
46-
3. `docker ps` should show 2 docker containers (`auth_postgresql` and `gotrue_gotrue`)
46+
3. `docker ps` should show 2 docker containers (`auth-auth-1` and `auth-postgres-1`)
4747
4. That's it! Visit the [health checkendpoint](http://localhost:9999/health) to confirm that auth is running.
4848

4949
## Running in production

docker-compose-dev.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
version: "3.9"
21
services:
32
auth:
4-
container_name: auth
53
depends_on:
64
- postgres
75
build:
@@ -19,7 +17,6 @@ services:
1917
build:
2018
context: .
2119
dockerfile: Dockerfile.postgres.dev
22-
container_name: auth_postgres
2320
ports:
2421
- '5432:5432'
2522
volumes:

0 commit comments

Comments
 (0)