From 2ea37cf64887353cfa31e936163f33f858d73ffb Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Sun, 15 Dec 2024 17:41:03 -0500 Subject: [PATCH] change make file docker container name --- backend/Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/Makefile b/backend/Makefile index 693a7e52..5941d053 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -23,7 +23,7 @@ sql: seed: @echo "Running development seed data..." - @cat .sqlc/seeds/development_seed.sql | docker exec -i nokap-postgres psql -U postgres -d postgres + @cat .sqlc/seeds/development_seed.sql | docker exec -i spur-postgres psql -U postgres -d postgres setup: @go install github.com/air-verse/air@v1.61.1 && \ @@ -31,24 +31,24 @@ setup: go install github.com/pressly/goose/v3/cmd/goose@v3.22.1 init-dev-db: - @docker run --name nokap-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DATABASE=postgres -p 5432:5432 -d postgres:$(POSTGRESQL_VERSION) && \ - timeout 90s bash -c "until docker exec nokap-postgres pg_isready ; do sleep 5 ; done" && echo "Postgres is ready! Run migrations with 'make up'" + @docker run --name spur-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DATABASE=postgres -p 5432:5432 -d postgres:$(POSTGRESQL_VERSION) && \ + timeout 90s bash -c "until docker exec spur-postgres pg_isready ; do sleep 5 ; done" && echo "Postgres is ready! Run migrations with 'make up'" start-dev-db: - @docker start nokap-postgres && \ + @docker start spur-postgres && \ timeout 90s bash -c \ - "until docker exec nokap-postgres pg_isready ; do sleep 5 ; done" && \ + "until docker exec spur-postgres pg_isready ; do sleep 5 ; done" && \ echo "Postgres is ready! Run migrations with 'make up'" stop-dev-db: - @docker stop nokap-postgres + @docker stop spur-postgres check-dev-db: - @docker exec nokap-postgres pg_isready + @docker exec spur-postgres pg_isready clean-dev-db: - @docker stop nokap-postgres && docker rm nokap-postgres + @docker stop spur-postgres && docker rm spur-postgres health-dev-db: @echo "Checking server health..." @curl -s localhost:8080/api/v1/health | jq || echo "Failed to connect to health endpoint" query: - @docker exec nokap-postgres psql -U postgres -d postgres -c "$(filter-out $@,$(MAKECMDGOALS))" + @docker exec spur-postgres psql -U postgres -d postgres -c "$(filter-out $@,$(MAKECMDGOALS))" # Prevent make from treating the query string as a target %: @: