From 66419687d1c77be553402c48d1b7359d285ed60c Mon Sep 17 00:00:00 2001 From: Luis Angel Arvelo Date: Sun, 1 Oct 2023 23:22:09 +0000 Subject: [PATCH] Update configs for the test workflow --- .env.example | 1 - .gitignore | 2 +- makefile => Makefile | 6 +++--- app.env | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 .env.example rename makefile => Makefile (66%) create mode 100644 app.env diff --git a/.env.example b/.env.example deleted file mode 100644 index c4e8bf6..0000000 --- a/.env.example +++ /dev/null @@ -1 +0,0 @@ -DB_SOURCE=postgres://root:secret@localhost:5432/postgres?prepareThreshold=0 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2b5fd63..67d6924 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ # Go workspace file go.work -app.env \ No newline at end of file +.env \ No newline at end of file diff --git a/makefile b/Makefile similarity index 66% rename from makefile rename to Makefile index 6a208a3..7c12c8f 100644 --- a/makefile +++ b/Makefile @@ -1,5 +1,5 @@ #!make -include app.env +DB_SOURCE=postgresql://root:secret@localhost:5432/RDB?sslmode=disable postgres: docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine @@ -9,9 +9,9 @@ dropdb: docker exec -it postgres12 dropdb RBD migrateup: - migrate -path db/migrations -database "${DB_SOURCE}" -verbose up 1 + migrate -path db/migrations -database "$(DB_SOURCE)" -verbose up 1 migratedown: - migrate -path db/migrations -database "${DB_SOURCE}" -verbose down 1 + migrate -path db/migrations -database "$(DB_SOURCE)" -verbose down 1 sqlc: sqlc generate diff --git a/app.env b/app.env new file mode 100644 index 0000000..7198c78 --- /dev/null +++ b/app.env @@ -0,0 +1 @@ +DB_SOURCE=postgresql://root:secret@localhost:5432/RBD?sslmode=disable \ No newline at end of file