pull down to refresh

It was relatively complicated to get a local dev environment up and running so I was asked to dockerize it. I've updated the README on the repo but the important bits:
  1. Install docker-compose and deps if you don't already have it installed
  2. git clone git@github.com:stackernews/stacker.news.git sn && cd sn
  3. docker-compose up --build
You should then be able to access the site at localhost:3000 and any changes you make will hot reload. If you want to login locally or use lnd you'll need to modify .env.sample appropriately. If you have trouble please open an issue so I can help and update the README for everyone else.
I'd really like to help with the dev, but I've never codded JS before, mostly because I've never had the need. I've some C experience (not much) and I'm beyond the basics with Python (I'd class myself as reasonably competent). I've also built a website and CMS using PHP, HTML and CSS.
If you think that I'd be able to make a contribution, I'd like to try. Aside from W3Schools (which is one of my 'go-to's), are there any sites that you'd recommend, for learning JS? If you'd prefer to use only experienced coders, just say as much, I'll not be offended: I much prefer honesty, over B.S.
reply
It’s hard to tell what your potential is without knowing more about you. But if there’s something you want to do, why not try and see how far you can get? Experience doesn’t matter here - just the quality of the result.
reply
Cool, thank you. I'll set up a dev machine and get to it.
reply
best plan ever setting up a dev machine!
reply
For sure! Experience has taught me that, least ways.
reply
i ran this docker on my live docker vm machine and was like uuups docker space low. so i rememberd my docker ubuntu dev machine a old imac hardware from 2014. 40W but alwas ready to serve.
This is great! I am getting the below error, any idea what could be happening:
reply
can you try: git clone https://github.com/stackernews/stacker.news.git sn && cd sn
reply
Whether it’s http or ssh won’t matter. It’s something with the environment not getting picked up.
reply
Can you try enclosing all the bracketed variables in quotes. e.g.
GITHUB_SECRET="<YOUR GITHUB SECRET>"
and see if that works?
reply
Thanks! What OS are you running?
reply
i get: Error: Invalid prisma.queryRaw() invocation:
error: Error validating datasource db: the URL must start with the protocol postgresql:// or postgres://. --> schema.prisma:6 | 5 | provider = "postgresql" 6 | url = env("DATABASE_URL") |
Validation Error Count: 1
maybe i need to fix the db path somewhere?
reply
You used docker and got this error?
reply
on two different ubuntu docker hosts. but most of the time i am the problem. it try getting db connection right.
i ran: git clone https://github.com/stackernews/stacker.news.git sn && cd sn maybe that is the issue.
reply
Okay, I'm trying to compose them fresh again and see if maybe something got mangled. But your error suggests, the web app isn't picking up the .env.sample file.
reply
cool. i am more a tester. reading up code is fun but takes me a long time. let me know i can debug here. i was in the sn app shell and nano checked the .env.sample it was fine.
5ccxxxxxxx42 sn_app "docker-entrypoint.s…" 18 minutes ago Up 18 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp app 402xxxxxxxxb9a postgres "docker-entrypoint.s…" 18 minutes ago Up 18 minutes 0.0.0.0:5431->5432/tcp, :::5431->5432/tcp
reply
Doing it clean again on Mac worked for me.
Can you change the references of .env.sample in docker-compose.yml to ./.env.sample and tell me if that works? I suspect there's some implementation difference in docker across OS's but it might also be silently failing while parsing the file like @spraveenitpro is experiencing.