Skip to content

Commit

Permalink
chore: add sh scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-bozin-org committed May 3, 2024
1 parent 7286d33 commit 59472d6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
run: sleep 15

- name: Run tests
run: cargo test --verbose -- --nocapture
run: cargo test --verbose -- --nocapture
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/target
.env
/docker-volumes
/docker-volumes
wisdoms.json
encoded-wisdoms.b64
decoded-wisdoms.json
1 change: 1 addition & 0 deletions decode-wisdoms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
base64 -d encoded-wisdoms.b64 > decoded-wisdoms.json
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432" # Remmaped from 5432:5432 to 5435:5432
- "5432:5432"
volumes:
- ./docker-volumes/postgres-wisdomia-monolithic-volume:/var/lib/postgresql/data
networks:
Expand Down
1 change: 1 addition & 0 deletions encode-wisdoms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
base64 wisdoms.json > encoded-wisdoms.b64
6 changes: 3 additions & 3 deletions migrations/0002_initial-wisdoms-population.up.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BEGIN TRANSACTION;

INSERT INTO wisdoms (id, description) VALUES (1, 'Patience is a virtue.');
INSERT INTO wisdoms (id, description) VALUES (2, 'Knowledge is power.');
INSERT INTO wisdoms (id, description) VALUES (3, 'Time is money.');
INSERT INTO wisdoms (description) VALUES ('Patience is a virtue.');
INSERT INTO wisdoms (description) VALUES ('Knowledge is power.');
INSERT INTO wisdoms (description) VALUES ('Time is money.');

COMMIT;

0 comments on commit 59472d6

Please sign in to comment.