You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/04/27 06:19:05 UTC

[GitHub] [pulsar-manager] Persi opened a new issue #294: Docker Image breaks with standard rules and ignores external databases

Persi opened a new issue #294:
URL: https://github.com/apache/pulsar-manager/issues/294


   The currently available Docker image starts an internal postgres database in addition to frontend and backend services. As per standard advices to Docker images every Image should run only one service. Which here means running frontend and backend in one image might probably be ok, as they represent that one service, but the postgres database should not be part of this image as it makes this image unusable for production environments.
   
   Additionally if I use a standalone Postgres database outside of this image i can configure it's address, but the schema configuration always only happens on the internal database, which causes 500 errors in backend as tables are missing.
   
   Here is an example docker-compose file to reproduce this behaviour:
   `version: '3.7'
   
   services:
     pulsar-standalone:
       image: apachepulsar/pulsar:2.5.1
       command: bin/pulsar standalone
       restart: always
       ports:
         - "6650:6650"
         - "8080:8080"
       volumes:
         - pulsar_data:/pulsar/data
         - pulsar_conf:/pulsar/conf
   
     pulsar-manager:
       image: apachepulsar/pulsar-manager:v0.1.0
       depends_on:
         - pulsar-standalone
       restart: always
       environment:
         REDIRECT_HOST: "https://message-broker-ui.${BASE_DOMAIN}"
         REDIRECT_PORT: "443"
         DRIVER_CLASS_NAME: org.postgresql.Driver
         URL: jdbc:postgresql://pulsar-manager-db/pulsar_manager
         #following url uses internal database with which the manager is working
         #URL: jdbc:postgresql://127.0.0.1:5432/pulsar_manager
         USERNAME: pulsar
         PASSWORD: pulsar
         LOG_LEVEL: ERROR
       volumes:
         - /Users/mberndt/Documents/ceresprojects/ceres/ceres-messaging/logs:/logs
         - pulsar-manager_data:/data
   
     pulsar-manager-db:
       image: postgres:12
       restart: always
       environment:
         POSTGRES_DB: pulsar_manager
         POSTGRES_USER: pulsar
         POSTGRES_PASSWORD: pulsar
       volumes:
         - pulsar-manager_db_data:/var/lib/postgresql/data
   
   volumes:
     pulsar_data:
     pulsar_conf:
     pulsar-manager_data:
     pulsar-manager_db_data:
   
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] tuteng commented on issue #294: Docker Image breaks with standard rules and ignores external databases

Posted by GitBox <gi...@apache.org>.
tuteng commented on issue #294:
URL: https://github.com/apache/pulsar-manager/issues/294#issuecomment-620405657


   Thank you for your feedback. We will consider optimizing this later. @Persi 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] tuteng commented on issue #294: Docker Image breaks with standard rules and ignores external databases

Posted by GitBox <gi...@apache.org>.
tuteng commented on issue #294:
URL: https://github.com/apache/pulsar-manager/issues/294#issuecomment-620327498


   I think if you want to use a custom database, you need to initialize the table structure first. https://github.com/apache/pulsar-manager/tree/master/src#use-custom-databases @Persi 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] Persi commented on issue #294: Docker Image breaks with standard rules and ignores external databases

Posted by GitBox <gi...@apache.org>.
Persi commented on issue #294:
URL: https://github.com/apache/pulsar-manager/issues/294#issuecomment-620384295


   I know i could do that but that's exactly the point where this Docker Image breaks with standards. It always initializes and starts it's internal PgSQL Instance which I don't even want to use. Instead it could initialize my external DB as I have to configure a database URL with user and password in environment, so the Image has all information to initialize my database automatically an don't even start it's internal PgSQL instance.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] Persi edited a comment on issue #294: Docker Image breaks with standard rules and ignores external databases

Posted by GitBox <gi...@apache.org>.
Persi edited a comment on issue #294:
URL: https://github.com/apache/pulsar-manager/issues/294#issuecomment-620384295


   I know i could do that but that's exactly the point where this Docker Image breaks with standards. It always initializes and starts it's internal PgSQL Instance which I don't even want to use. Instead it could initialize my external DB as I have to configure a database URL with user and password in environment, so the Image has all information to initialize my database automatically and don't even start it's internal PgSQL instance.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] Omega-Ariston commented on issue #294: Docker Image breaks with standard rules and ignores external databases

Posted by GitBox <gi...@apache.org>.
Omega-Ariston commented on issue #294:
URL: https://github.com/apache/pulsar-manager/issues/294#issuecomment-659189964


   Met a problem that due to similar reason... created a pr to fix this: #320 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] tuteng closed issue #294: Docker Image breaks with standard rules and ignores external databases

Posted by GitBox <gi...@apache.org>.
tuteng closed issue #294:
URL: https://github.com/apache/pulsar-manager/issues/294


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org