souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
389 stars 62 forks source link

This page isn’t working right now error with docker-compose #142

Closed tempcoderr closed 1 year ago

tempcoderr commented 1 year ago

I have written the following docker compose file:

version: "3"

services:
  server:
    build: https://github.com/souramoo/commentoplusplus.git
    ports:
      - 3002:8080
    environment:
      COMMENTO_ORIGIN: http://localhost:3002
      COMMENTO_PORT: 3002
      COMMENTO_POSTGRES: postgres://postgres:testpass@db:5432/commentopp?sslmode=disable
    depends_on:
      - db
    networks:
      - db_network
  db:
    image: postgres:12
    environment:
      POSTGRES_DB: commentopp
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: testpass
    networks:
      - db_network
    volumes:
      - postgres_data_volume:/var/lib/postgresql2/data

networks:
  db_network:

volumes:
  postgres_data_volume:

When I do docker-compose up and open http://localhost:3002, it gives me This page isn’t working right now error. Can anyone tell me what is wrong here?

abstractvector commented 1 year ago

COMMENTO_PORT is the port for commento to listen on inside the container. It should match the port number after the : in your port list, 8080 in your case. COMMENTO_ORIGIN is the URL that you will be exposing publicly.

In your case, simply changing COMMENTO_PORT to 8080 should fix your issue.

tempcoderr commented 1 year ago

Thanks a lot @abstractvector, it worked.