1. 13

This is what i’ve got so far

Tip#1: How to get to a Production lobsters clone:

- git branch 'clone_name' && git checkout 'clone_name'
- read through the readme, and follow those steps
- bundle with sphinx and mysql commented out (for now)
- delete indices folder (or add to .gitignore)
- change the domain name in application.rb
- add .env file to track envirionment variables
- sort out .gitignore (add .env, comment out secret.rb, unicorn config)
- create a secret token, store in .env
- create a config/unicorn.rb file
- disable https/ssl (to test in production)
- get a domain, set that up
- get an SSL cert, re-enable SSL
- add sphinx back, for search

deploy to heroku with: git push heroku clone_name:master

to avoid pushing normal lobsters to your heroku app

this way you can pull any changes to the lobsters codebase, and then rebase your clone_name to the updated master branch

questions i have so far:

How do users create new tags on the website? I’m able to do this from the console, but can’t figure it out on the submit story form

  1. 2

    I briefly went through this a few months ago, but haven’t had time to revisit it yet. If you’re doing heroku, you’ll run into the following issues assuming the codebase nor heroku hasn’t significantly changed since ~Nov2013:

    1. Heroku rails apps still only work with postgres, not really mariadb/mysql

    2. The lobsters source (back in nov. 2013) used some mariadb/mysql specific calls, I sorta tried to fix them here to work on postgres/heroku: https://github.com/seltzered/journaltalk and did a bit more details on it here: https://stackoverflow.com/questions/12427648/mysql-to-postgres-conversion/19624041#19624041 , but the code there is pretty much at your own risk. We ended up setting up a DO instance for future work.

    More heroku-ish stuff:

    3- If you want to use sphinx on heroku, you can use the thinking-sphinx heroku add-on. I think the cost is ~10/month

    4- For ssl on heroku, you’ll also need to setup an ssl endpoint.

    tl;dr - double check on point #1 before really trying to use lobsters on heroku. And feel free to prove me wrong on this stuff, I haven’t been doing rails much these days.

    1. 1

      what broke under postgres? at the very least, i’ve got the site to boot, and basic use cases seem to work fine (submitting a story, voting)

      • sphinx is just off for now, no point in having search for a brand new site that’s tiny

      • SSL should probably be on, we’ll need to get a cert before we launch

      thanks for the tips, and the link btw

    2. 2

      What are you trying to create another lobster clone for?

      1. 11

        I’d assume they want to use it for something other than tech news.

        1. 4

          I, for example, have opened a lobster clone for Russian developers https://develop.re/

          1. 2

            that’s a great domain name

          2. 3

            We have a small dev community in Hawaii, and we deployed our own lobster clone because we wanted a place to share and discuss links/events. We also wanted something we could customize a bit (so that ruled out reddit, also reddit is generally too public for the type of discussion we wanted), so rather than NIH another link-sharing site we started with the lobsters codebase.