Skip to main content

Local setup of prYv

Comments

8 comments

  • Official comment
    Pryv Support

    Hi lakshminarayanankesavan,

    There is no installation setup available for accessing the application without ssl in local.

    If you need a SSL-less deployment please use the following instructions: https://github.com/pryv/open-pryv.io/tree/master/docker#server-with-external-ssl

    You will need to modify the protocol to "http" in the publicUrl parameter: https://github.com/pryv/open-pryv.io/blob/master/docker/production-no-ssl/dockerized-config.yml#L6

    Best Regards,

    Ilia

     

  • lakshminarayanankesavan

    Thanks for reply. I updated the production-no-ssl/dockerized-config.yml as below

    ---
    openSource:
    isActive: true
    dnsLess:
    isActive: true
    publicUrl: http://localhost
    http:
    port: 3000
    ip: 0.0.0.0
    auth:
    adminAccessKey:<i gave the value which is available in Git page>
    trustedApps: "*@https://pryv.github.io, *@https://${HOSTNAME}*"
    eventFiles:
    attachmentsDirPath: "/app/data/attachments"
    service:
    name: Open-Pryv.io
    support: https://pryv.com/open-pryv-non-configured-page/
    terms: https://pryv.com/open-pryv-non-configured-page/
    home: https://pryv.com/open-pryv-non-configured-page/
    eventTypes: https://api.pryv.com/event-types/flat.json
    services:
    email:
    enabled:
    welcome: true
    resetPassword: true
    url: http://open-pryv-mail:9000/sendmail/
    database:
    host: open-pryv-mongo

    and docker-compose.yml looks like below,

    version: "3"
    services:
    open-pryv.io:
    image: pryvio/open-pryv.io:latest
    command: "yarn api"
    container_name: "open-pryv.io"
    restart: "always"
    ports:
    - 3000:3000
    volumes:
    - ./dockerized-config.yml:/app/config.yml
    - ../public_html/:/app/public_html/
    - coredata:/app/data/
    depends_on:
    - open-pryv-mongo
    networks:
    - app-network

    open-pryv-mail:
    image: pryvio/open-pryv.io:latest
    command: "/bin/sh /app/mail.sh"
    container_name: "open-pryv-mail"
    restart: "always"
    volumes:
    - ../var-pryv/logs/:/app/var-pryv/logs/
    - ./dockerized-service-mail-config.hjson:/app/service-mail/config.hjson
    depends_on:
    - open-pryv.io
    networks:
    - app-network

    open-pryv-mongo:
    image: mongo:4.2.9
    container_name: "open-pryv-mongo"
    restart: "always"
    volumes:
    #- ../var-pryv/mongodb/data/:/data/db/
    #- ../var-pryv/mongodb/backup/:/data/backup/
    - mongodata:/data/db/
    - mongobackup:/data/backup/
    networks:
    - app-network

    networks:
    app-network:
    driver: bridge

    volumes:
    mongodata:
    mongobackup:
    coredata:

    All the 3 containers started 

    open-pryv-mail

    open-pryv.io

    open-pryv-mongo

    But when i try to access the application using http://localhost, i am not getting any webpage.

     

    Let me know if i m missing anything.

    Thanks.

    0
  • Pryv Support

    The API should answer to http://localhost:3000

    What do you get if you open http://localhost:3000/hello in the browser?

    Best,

    Ilia

    0
  • lakshminarayanankesavan

    I got the response as below

    {"meta":{"apiVersion":"1.7.1-6-open","serverTime":1636462180.41},"cheersFrom":"Pryv API","learnMoreAt":"https://api.pryv.com/"}

    Regards

    K. Lakshmi Narayanan

     

    0
  • Pryv Support

    Open Pryv.io is up and running, the next steps are to create an account using the default apps. However, they won't work with a backend that is not running in HTTPS. You can test the API directly using the API reference or Postman, available here: https://api.pryv.com/

    For the hosted apps to work, you should use the local with SSL version: https://github.com/pryv/open-pryv.io/tree/master/docker#local-dev-with-ssl

    Once it is running, follow the tutorial from: https://github.com/pryv/open-pryv.io#start

    Best,

    Ilia

    0
  • lakshminarayanankesavan

    I actually started with SSL version. But it was not successful.

    All the containers came up.

    When i try to create an account, i get error as 

    https://api.pryv.com/app-web-access/?pryvServiceInfoUrl=https://localhost:4443/reg/service/info

    "Error: Cannot fetch service/info"

    dockerized-config.yml

    openSource:
    isActive: true
    dnsLess:
    isActive: true
    #publicUrl: https://YY173546.rec.la:4443
    publicUrl: https://localhost:4443
    http:
    port: 3000
    #port: 80
    #ip: 0.0.0.0
    ip: 127.0.0.1
    auth:
    adminAccessKey: <i updated this with the value in git>
    trustedApps: "*@https://pryv.github.io, *@https://*.rec.la*, *@http://*localhost*"
    eventFiles:
    #attachmentsDirPath: "/app/data/attachments"
    attachmentsDirPath: var-pryv/attachment-files
    service:
    name: Open-Pryv.io
    support: https://pryv.com/open-pryv-non-configured-page/
    terms: https://pryv.com/open-pryv-non-configured-page/
    home: https://pryv.com/open-pryv-non-configured-page/
    eventTypes: https://api.pryv.com/event-types/flat.json
    services:
    email:
    enabled:
    welcome: true
    resetPassword: true
    url: http://open-pryv-mail:9000/sendmail/
    database:
    host: open-pryv-mongo

    docker-compose.with-ssl.yml

    version: "3.8"
    services:
    open-pryv.io:
    image: pryvio/open-pryv.io:latest
    command: "yarn api"
    container_name: "open-pryv.io"
    restart: "always"
    volumes:
    - ./dockerized-config.yml:/app/config.yml
    - ../public_html/:/app/public_html/
    - ../var-pryv/core/data/:/app/data/
    depends_on:
    - open-pryv-mongo
    networks:
    - app-network

    open-pryv-mail:
    image: pryvio/open-pryv.io:latest
    command: "/bin/sh /app/mail.sh"
    container_name: "open-pryv-mail"
    restart: "always"
    depends_on:
    - open-pryv.io
    volumes:
    - ../var-pryv/logs/:/app/var-pryv/logs/
    - ./dockerized-service-mail-config.hjson:/app/service-mail/config.hjson
    networks:
    - app-network

    open-pryv-mongo:
    image: mongo:4.2.9
    container_name: "open-pryv-mongo"
    restart: "always"
    volumes:
    #- ../var-pryv/mongodb/data/:/data/db/
    #- ../var-pryv/mongodb/backup/:/data/backup/
    - mongodata:/data/db/
    - mongobackup:/data/backup/
    networks:
    - app-network

    open-pryv-nginx:
    container_name: "open-pryv-nginx"
    image: nginx:latest
    volumes:
    # You can load custom nginx config and use env variables in it
    - ./nginx-templates:/etc/nginx/templates
    # Load default *.rec.la (or your) certificates
    - ../rec.la-certificates/rec.la-bundle.crt:/etc/letsencrypt/live/my-computer.rec.la/fullchain.pem
    #- ../rec.la-certificates/rec.la-bundle.crt:/etc/letsencrypt/live/YY173546.rec.la/fullchain.pem
    - ../rec.la-certificates/rec.la-key.pem:/etc/letsencrypt/live/my-computer.rec.la/privkey.pem
    #- ../rec.la-certificates/rec.la-key.pem:/etc/letsencrypt/live/YY173546.rec.la/privkey.pem
    - ./dhparam.pem:/etc/letsencrypt/ssl-dhparams.pem
    ports:
    #- 80:80
    - 4443:4443
    - 3000:3000
    depends_on:
    - open-pryv.io
    - open-pryv-mail
    networks:
    - app-network
    environment:
    #- PORT=80
    - PORT=3000
    - PORT_SSL=4443
    - HOSTNAME=my-computer.rec.la
    #- HOSTNAME=localhost
    - NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx

    networks:
    app-network:
    driver: bridge
    volumes:
    mongodata:
    mongobackup:

     

     

     

    0
  • Pryv Support

    In order to use it with the rec.la certificate, follow the instructions from https://github.com/pryv/open-pryv.io/tree/master/docker#local-dev-with-ssl

    meaning, only modifiy the auth:adminAccessKey in the following file: https://github.com/pryv/open-pryv.io/blob/master/docker/local/dockerized-config.yml

    Then you can open: https://api.pryv.com/app-web-access/?pryvServiceInfoUrl=https://my-computer.rec.la:4443/reg/service/info.

    As advertised in here: https://github.com/pryv/open-pryv.io#start

    Best,

    Ilia

    0
  • lakshminarayanankesavan

    Still getting the same error as "Error: Cannot fetch service/info". I am running the container in my laptop.

    config

    openSource:
    isActive: true
    dnsLess:
    isActive: true
    publicUrl: https://my-computer.rec.la:4443
    http:
    port: 3000
    #port: 80
    ip: 0.0.0.0
    #ip: 127.0.0.1
    auth:
    adminAccessKey: iuahwd0ba87hw0bd7a8hwd
    trustedApps: "*@https://pryv.github.io, *@https://*.rec.la*"
    eventFiles:
    #attachmentsDirPath: "/app/data/attachments"
    attachmentsDirPath: var-pryv/attachment-files
    service:
    name: Open-Pryv.io
    support: https://pryv.com/open-pryv-non-configured-page/
    terms: https://pryv.com/open-pryv-non-configured-page/
    home: https://pryv.com/open-pryv-non-configured-page/
    eventTypes: https://api.pryv.com/event-types/flat.json
    services:
    email:
    enabled:
    welcome: true
    resetPassword: true
    url: http://open-pryv-mail:9000/sendmail/
    database:
    host: open-pryv-mongo

    with-ssl.yml

    version: "3.8"
    services:
    open-pryv.io:
    image: pryvio/open-pryv.io:latest
    command: "yarn api"
    container_name: "open-pryv.io"
    restart: "always"
    volumes:
    - ./dockerized-config.yml:/app/config.yml
    - ../public_html/:/app/public_html/
    - ../var-pryv/core/data/:/app/data/
    depends_on:
    - open-pryv-mongo
    networks:
    - app-network

    open-pryv-mail:
    image: pryvio/open-pryv.io:latest
    command: "/bin/sh /app/mail.sh"
    container_name: "open-pryv-mail"
    restart: "always"
    depends_on:
    - open-pryv.io
    volumes:
    - ../var-pryv/logs/:/app/var-pryv/logs/
    - ./dockerized-service-mail-config.hjson:/app/service-mail/config.hjson
    networks:
    - app-network

    open-pryv-mongo:
    image: mongo:4.2.9
    container_name: "open-pryv-mongo"
    restart: "always"
    volumes:
    #- ../var-pryv/mongodb/data/:/data/db/
    #- ../var-pryv/mongodb/backup/:/data/backup/
    - mongodata:/data/db/
    - mongobackup:/data/backup/
    networks:
    - app-network

    open-pryv-nginx:
    container_name: "open-pryv-nginx"
    image: nginx:latest
    volumes:
    # You can load custom nginx config and use env variables in it
    - ./nginx-templates:/etc/nginx/templates
    # Load default *.rec.la (or your) certificates
    - ../rec.la-certificates/rec.la-bundle.crt:/etc/letsencrypt/live/my-computer.rec.la/fullchain.pem
    #- ../rec.la-certificates/rec.la-bundle.crt:/etc/letsencrypt/live/YY173546.rec.la/fullchain.pem
    - ../rec.la-certificates/rec.la-key.pem:/etc/letsencrypt/live/my-computer.rec.la/privkey.pem
    #- ../rec.la-certificates/rec.la-key.pem:/etc/letsencrypt/live/YY173546.rec.la/privkey.pem
    - ./dhparam.pem:/etc/letsencrypt/ssl-dhparams.pem
    ports:
    - 80:80
    - 4443:4443
    #- 3000:3000
    depends_on:
    - open-pryv.io
    - open-pryv-mail
    networks:
    - app-network
    environment:
    - PORT=80
    #- PORT=3000
    - PORT_SSL=4443
    - HOSTNAME=my-computer.rec.la
    #- HOSTNAME=localhost
    - NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx

    networks:
    app-network:
    driver: bridge
    volumes:
    mongodata:
    mongobackup:

     

     

     

    0

Please sign in to leave a comment.