You can use Github Codespaces to hack on IFDB and IFComp

IFDB and IFComp have public code available on Github.

They include README instructions on how to set them up on your own computer, requiring you to install Docker on your local machine to launch the app in a Docker instance, in a virtual machine on your own computer.

That’s all well and good if you’ve got a nice, beefy computer, but several folks have said that their machines struggle to run an entire virtual machine locally.

Well, I recently became aware of just how easy it is to get IFDB and IFComp up and running on Github Codespaces.

Here’s how.

  1. Navigate to either IFDB or IFComp on Github.
  2. There’s a big green < > Code button on that page; when you click on it, it shows you a popup with two tabs, “Local” and “Codespaces.”
  3. Click on “Codespaces” and “Create codespace on main.”
  4. After you wait a bit, you’ll be in a new browser tab, with Visual Studio Code running. You can type commands in the “Terminal” tab on the bottom of the screen.
  5. In “Terminal,” follow the setup instructions the README.
    • IFDB: That means running ./prepare_dev_environment.sh and then docker compose up --build.
    • IFComp: Following the instructions in CONTRIBUTING.md, you’d cd IFComp-Dev, run docker compose build and then docker compose up.
  6. After waiting, the app will launch, and you’ll see an alert “Your application running on port #### is available.” You can click the “Open in Browser” button there. If you miss the popup, you can click on the “Ports” tab and see the “Forwarded Address” link. You can click the little globe :globe_with_meridians:, and, lo and behold, the app will be up and running in a browser tab.
  7. Eventually, your codespace will automatically shut itself down for inactivity. (There’s a limit on the number of hours you’re allowed to keep a Codespace running for free.) When you’re done working, pop over to https://github.com/codespaces/, click the “…” menu next to your codespace, and click “Stop codespace.” You can use that page to find your codespace and open it again by clicking on the code space. (You’ll need to run docker compose up again to restart the app after you stop your codespace.)

Github Codespaces allows 15 GB free disk space per month (both the IFDB instance and the IFComp instance combined are well under that) and 120 hours per month.

Give it a try!

13 Likes

I was asking for help on this, and finally figured it out with help.

I clicked on ‘fork’ on the ifdb repository, then in my fork I clicked on the green code button and chose ‘codespace’. Then directions to compile it showed up on the screen and I followed them.

BG showed me how you can click on the explorer on the left side of the screen and edit them directly to see immediate effects on the website. This lets you tinker around with changes.

If you find changes that look good and work, you can (I think) submit a pull request for it to be reviewed and possibly incorporated.

So if you have an idea for IFComp that you think wouldn’t be hard to handle (like an ugly piece of UI that you think should collapse or a new kind of search term) go ahead and try it out!

1 Like

@dfabulich, I want to test something that requires being logged in. I tried to follow the instructions on the readme for creating a new user and finding the text of the activation email, but the activation link isn’t working for me, or I’m not pasting it in the right place.

Are there any built-in sample usernames that I can use to log in?

Yes!

  • You can login as ifdbadmin at ifdb.org with the password secret to sign in as an administrator. The administrator has access to the “system maintenance panel” at http://localhost:8080/adminops.
  • Alternatively, you can login as test at ifdb.org with the password secret to sign in as a regular test user named Test Tester.
1 Like