Forem Creators and Builders 🌱

karvounis
karvounis

Posted on • Updated on

Questions regarding docker-compose installation

EDIT: This is fixed by manually deleting the docker volumes, /tmp and /node_modules and recreating the Docker services. I no longer get blank pages

Hello there,

I started using Forem a few days ago and I decided to run it locally using Docker compose. The whole build and deployment process took a while and I was pleasantly surprised that it also generated some fake users, posts, tags, articles, listings etc! However, I have a few issues going on:

  1. When I visit http://localhost:3000 I can see all the generated articles Image description
  2. Then, I login using the admin user
    1. An onboarding blank page appears that I can do nothing with it Image description
    2. If I go to http://localhost:3000 all is gone. Image description
    3. I cannot click on the profile icon
    4. I cannot create an article nor a listing Image description

Image description

Can you please help me understand what I am doing wrong?

Eventually, I would like to use the local Forem and its API in order to create a Terraform provider for it. This provider is going to make API calls (using an API key) to the Forem API and create/maintain/delete listings, articles etc

Top comments (5)

Collapse
 
karvounis profile image
karvounis Author

I removed the docker volumes, the /tmp, /node_modules and recreated the services. It seems to be working as normal now. @jamie thanks for your help

Collapse
 
jamie profile image
Jamie Gaskins

@karvounis This sounds like a mismatch in the host:port combo specified APP_DOMAIN environment variable and the Host header of the POST request. For local development, APP_DOMAIN should be localhost:3000 and APP_PROTOCOL should be http://.

Collapse
 
karvounis profile image
karvounis Author

Hey @jamie thanks for your comment! This is the environment variables I use for the rails service:

    environment:
      RAILS_ENV: development
      DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development
      DATABASE_URL_TEST: postgresql://forem:forem@testdb:5432/Forem_test
      REDIS_SESSIONS_URL: redis://redis:6379
      REDIS_SIDEKIQ_URL: redis://redis:6379
      REDIS_URL: redis://redis:6379
      RACK_TIMEOUT_WAIT_TIMEOUT: 10000
      RACK_TIMEOUT_SERVICE_TIMEOUT: 10000
      STATEMENT_TIMEOUT: 10000
      APP_DOMAIN: localhost:3000
      APP_PROTOCOL: http://
Enter fullscreen mode Exit fullscreen mode

However, I still get the blank onboarding page and the articles disappear when I login with the admin credentials.

Is there a way to create a new user or reuse the credentials for the seeded test users?

Collapse
 
karvounis profile image
karvounis Author • Edited on

I also get a lot of errors in the console that I do not know how to interpret. I executed bin/container-setup to first initialize Forem
forem.dev/remoteimages/uploads/art...

Thread Thread
 
karvounis profile image
karvounis Author

I also get a lot of errors like

rails_1      | ActionController::RoutingError (No route matches [GET] "/packs/js/Onboarding-892405e339067286e1f6.chunk.js"):
Enter fullscreen mode Exit fullscreen mode

I guess that somehow the necessary javascript code is not found or is not properly built