pull down to refresh

Maybe I am biased, but I didn't find SN's setup to be bad. Docker Compose does a good job at the multi-process architecture that SN has.
My only gripes (that I can remember):
  1. I ended up carrying a diff like this in my working tree at all times to point the compose file at my own .env instead of the sample .env. I chose this option so I could modify .env without risk of committing it with secrets. Maybe there's some support for implicit dev .env file overrides so I don't have to carry this diff?
diff --git a/docker-compose.yml b/docker-compose.yml index 43cb702..d518be9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: ports: - "5431:5432" env_file: - - ./.env.sample + - ./.env volumes: - db:/var/lib/postgresql/data app: @@ -24,7 +24,7 @@ services: depends_on: - db env_file: - - ./.env.sample + - ./.env ports: - "3000:3000" volumes: @@ -41,7 +41,7 @@ services: app: condition: service_healthy env_file: - - ./.env.sample + - ./.env ports: - "8080:8080" volumes: @@ -63,7 +63,7 @@ services: retries: 3 restart: always env_file: - - ./.env.sample + - ./.env expose: - "8080" ports:
  1. Not having a substantial database seed was challenging at times. IIRC, I made a couple of small seed file updates to help bootstrap a few use cases, but nothing substantial. But for many features, having a nice seed makes developing/testing easier. I think I've heard you mention working on this, so maybe it's improved since I last checked!
If I think of more, I'll add a follow-up comment.
100 sats \ 1 reply \ @jp305 6 Mar
I agree, that is something that came up for me too... I would have the compose file link a .env.local file and git ignore this.
reply
110 sats \ 0 replies \ @k00b OP 6 Mar
Yep, I'll add that to the list of things to fix
reply
42 sats \ 1 reply \ @k00b OP 6 Mar
Not having a substantial database seed was challenging at times.
I built a seed a few weeks ago but haven't incorporated it yet. Good reminder!
reply
Awesome!
reply
What's a database seed?
reply
It's basically an initial set of data populated into a database.
The source code repo contains the database schema itself, so when you stand it up locally, the structure (all the tables) are in place. But, for the most part, they're empty tables. So when you open up SN locally, there's minimal posts, comments, users, etc.
A database seed would populate test data into the database, making it easier to develop or test certain features because you have test/sample data to work with.
reply