Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taskfile: create-db via taskfile #167

Merged
merged 32 commits into from
Nov 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7451b5d
taskfile: create-db via taskfile
nhdzhra Oct 25, 2024
970bda1
feat: add script delete per single db and all db (mysql and postgresql)
immuslim Oct 26, 2024
08dda19
fix precommit linter
immuslim Oct 26, 2024
a6b4266
taskfile: update action taskfile db
nhdzhra Oct 28, 2024
883f913
taskfile: test action taskfile db
nhdzhra Oct 28, 2024
51dcc53
taskfile: fix action taskfile db
nhdzhra Oct 28, 2024
4298f2f
feat(infra): fix action db-dev
nhdzhra Oct 28, 2024
6be4c3e
github: add auth db dev
nhdzhra Oct 28, 2024
200e78e
taskfile: update actions db dev
nhdzhra Oct 29, 2024
b358d76
taskfile: update actions db dev
nhdzhra Oct 29, 2024
80b81f6
taskfile: update taskfile create-db
nhdzhra Oct 29, 2024
e007689
taskfile: update taskfile psql
nhdzhra Oct 30, 2024
bbb95d9
taskfile: update taskfile psql
nhdzhra Oct 30, 2024
93d90bb
taskfile: update taskfile psql
nhdzhra Oct 30, 2024
3a0d368
taskfile: get-app-name
nhdzhra Oct 30, 2024
3a87a26
taskfile: set env APP_NAME
nhdzhra Oct 30, 2024
cdd2ec2
taskfile: remove export pgpassword
nhdzhra Oct 30, 2024
97bf760
taskfile: remove export pgpassword
nhdzhra Oct 30, 2024
83020b8
taskfile: update taskfile psql
nhdzhra Oct 30, 2024
787d6e4
taskfile: update taskfile psql
nhdzhra Oct 30, 2024
974e89a
taskfile: update taskfile postgres
nhdzhra Oct 30, 2024
33c17e4
taskfile: fix taskfile postgres
nhdzhra Oct 30, 2024
06442b7
taskfile: tidy up taskfile
nhdzhra Oct 30, 2024
1cbbf6f
taskfile: tidy up taskfile
nhdzhra Oct 30, 2024
85b7c9b
taskfile: update taskfile delete postgres
nhdzhra Oct 31, 2024
afb2481
taskfile: update taskfile and actions for db-dev
nhdzhra Oct 31, 2024
8eb4bbe
taskfile: update actions destroy db dev
nhdzhra Nov 1, 2024
8d9a3e1
taskfile: fix typo action destroy
nhdzhra Nov 1, 2024
6a7ecb7
taskfile: fix typo password db
nhdzhra Nov 1, 2024
f800f74
taskfile: add condition for destroy release
nhdzhra Nov 1, 2024
4da82dd
taskfile: change uses version on destroy
nhdzhra Nov 1, 2024
226703e
Merge branch 'main' into feat/update-taskfile
nhdzhra Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
taskfile: update taskfile create-db
  • Loading branch information
nhdzhra committed Oct 29, 2024
commit 80b81f63c44ceadf0fe4592e7881e710eee4901d
8 changes: 4 additions & 4 deletions infra/tools/taskfile/Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -22,15 +22,15 @@ tasks:
mysql -h ${MYSQL_DEV_HOST} -u root -p${MYSQL_DEV_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS ${DB_NAME};
CREATE USER IF NOT EXISTS '${APP_NAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';
GRANT ALL PRIVILEGES ON ${DB_NAME}.* TO '${APP_NAME}'@'%';
FLUSH PRIVILEGES;" 2> /dev/null
FLUSH PRIVILEGES;"

create-pgsql-db:
desc: "Create a PostgreSQL DB"
ignore_error: true
cmds:
- psql -h ${PGSQL_DEV_HOST} -U postgres -c "CREATE DATABASE ${DB_NAME};" 2> /dev/null
- psql -h ${PGSQL_DEV_HOST} -U postgres -c "CREATE USER ${APP_NAME} WITH PASSWORD '${DB_PASSWORD}';" 2> /dev/null
- psql -h ${PGSQL_DEV_HOST} -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE ${DB_NAME} TO ${APP_NAME};" 2> /dev/null
- psql -h ${PGSQL_DEV_HOST} -U postgres -c "CREATE DATABASE ${DB_NAME};"
- psql -h ${PGSQL_DEV_HOST} -U postgres -c "CREATE USER ${APP_NAME} WITH PASSWORD '${DB_PASSWORD}';"
- psql -h ${PGSQL_DEV_HOST} -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE ${DB_NAME} TO ${APP_NAME};"

delete-pgsql-db:
desc: "Delete a Single PostgreSQL DB"