Skip to content

Commit

Permalink
chore: comment postgre docker initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Utilitycoder committed Aug 21, 2023
1 parent 5aff7ca commit c56353f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[alias]
3 changes: 3 additions & 0 deletions scripts/init_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ until PGPASSWORD="${DB_PASSWORD}" psql -h "${DB_HOST}" -U "${DB_USER}" -p "${DB_
sleep 1
done

# Echo successful message upon sussessful connection
>&2 echo "Postgres is up and running on port ${DB_PORT} - running migrations now!"

# Run migrations
export DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
sqlx database create
sqlx migrate run

# Echo successful message upon sussessful migration
>&2 echo "Postgres has been migrated, ready to go!"

0 comments on commit c56353f

Please sign in to comment.