Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect HOMER 7 to external DB #643

Closed
Meleheora opened this issue May 23, 2024 · 5 comments
Closed

How to connect HOMER 7 to external DB #643

Meleheora opened this issue May 23, 2024 · 5 comments

Comments

@Meleheora
Copy link

Meleheora commented May 23, 2024

Hello. I have a some trouble.
I can't to change external port to connect to external DB in homer-webapp.
I tried adding the port to DB_HOST via :
I tried adding DB_PORT.
In any case, it connects on the standard PGSQL port - 5432

My docker-compose.yml for example:

  homer-webapp:
    container_name: homer-webapp
    image: sipcapture/webapp
    environment:
      #      - "LOKI_HOST=loki"
      #      - "PROM_HOST=prometheus"
      - "DB_HOST=HOST"
      - "DB_PORT=54432"
      - "DB_USER=homer"
      - "DB_PASS=HOMERPASS"
    restart: unless-stopped
    ports:
      - "9080:80"
      - "9043:443"
    volumes:
      - ./bootstrap:/app/bootstrap
    logging:
      options:
        max-size: "50m"
Copy link

Please star this repository to motivate the developers and to get higher priority! ⭐

@Meleheora
Copy link
Author

Meleheora commented May 24, 2024

Also i cant change a DB_NAME for homer-webapp.
In particular, if i change DB_NAME in heplify-server.

My example for heplify-server:

  heplify-server:
    image: sipcapture/heplify-server
    container_name: heplify-server
    ports:
      - "9060:9060"
      - "9060:9060/udp"
      - "9061:9061/tcp"
    command:
      - './heplify-server'
    environment:
      - "HEPLIFYSERVER_HEPADDR=0.0.0.0:9060"
      - "HEPLIFYSERVER_HEPTCPADDR=0.0.0.0:9061"
      - "HEPLIFYSERVER_DBSHEMA=MY_CUSTOM_DB_NAME"
      - "HEPLIFYSERVER_DBDRIVER=postgres"
      - "HEPLIFYSERVER_DBADDR=MY_PGSQL_HOST:6432"
      - "HEPLIFYSERVER_DBUSER=homer"
      - "HEPLIFYSERVER_DBPASS=HOMER_PASS"
      - "HEPLIFYSERVER_DBDATATABLE=homer_data"
      - "HEPLIFYSERVER_DBCONFTABLE=homer_config"
      - "HEPLIFYSERVER_DBROTATE=true"
      - "HEPLIFYSERVER_DBDROPDAYS=5"
#     - "HEPLIFYSERVER_LOGLVL=info"
#      - "HEPLIFYSERVER_LOGSTD=true"
#      - "HEPLIFYSERVER_PROMADDR=0.0.0.0:9096"
#      - "HEPLIFYSERVER_PROMTARGETIP=127.0.0.1"
#      - "HEPLIFYSERVER_PROMTARGETNAME=local"
#      - "HEPLIFYSERVER_DEDUP=false"
        #      - "HEPLIFYSERVER_LOKIURL=http://loki:3100/api/prom/push"
        #      - "HEPLIFYSERVER_LOKITIMER=2"
    restart: unless-stopped
      #    depends_on:
      #      - loki
      #      - db
    expose:
      - 9090
      - 9096
    labels:
      org.label-schema.group: "monitoring"
    logging:
      options:
        max-size: "50m"

@lmangani
Copy link
Member

@Meleheora a safe way is to use the homer-app configuration to change the host/port settings and/or change the container command to include the database-port parameter to set a different port.

@Meleheora
Copy link
Author

Meleheora commented Jun 19, 2024

Thanks for answer. Can you explain please what kind of command i need to include?
Earlier I wrote that setting a variable in environment does not help to change the connection port

@Meleheora
Copy link
Author

@Meleheora a safe way is to use the homer-app configuration to change the host/port settings and/or change the container command to include the database-port parameter to set a different port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants