Skip to content

Commit

Permalink
update: postgres setup in flake
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyjohnson1 committed Nov 1, 2024
1 parent e5d04b7 commit 334f734
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ topos run
nix develop .#poetry
```

## Install Tips

### POSTGRES
- If postgres is already running, running the bin fails, shut it down first.
- Nix will manage postgres' start/stop function itself when you use it, but if you have started the database elsewhere, it won't be able to manage it, and will fail to start up.


## Install Instructions
requires `brew install just`
requires `brew install poetry`
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

configFile = pkgs.copyPathToStore ./config.yaml;
yq = pkgs.yq-go;

kafkaPreStartup = ''
echo "Kafka is ready. Creating topic..."
${pkgs.apacheKafka}/bin/kafka-topics.sh --create --topic chat_topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1 --if-not-exists
Expand Down
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ python:

dmg:
create-dmg topos.app --volicon "topos/assets/topos_blk_rounded.png" --icon "topos/assets/topos_blk_rounded.png"

stoppg:
export PGDATA=$(pwd)/pgdata
echo "Stopping any existing PostgreSQL server..."
pg_ctl -D "$PGDATA" stop || echo "No existing server to stop."

0 comments on commit 334f734

Please sign in to comment.