LAMP Consortium

Question about Migration to CouchDB from MSSQL

Hello,

Could you kindly help answer some questions with the CouchDB migration of stack.yml file in Portainer? https://www.notion.so/Deploying-the-LAMP-Platform-e281278b00c1475caee5ccf3ffaafba0

Lastly, how can I Delete the entire MSSQL environment so that we can save space and verify if my migration to Couch DB is successful?

Hello,

This is the latest docker image: https://hub.docker.com/r/bidmcdigitalpsychiatry/lamp-server
It was updated a day ago :slight_smile:

Yes that is where you put the Couch DB Password!

For now, you can leave those blank or remove them entirely as we cannot provide these until we have received your IRB and you are a full Consortium member.

To delete the environment, you can either delete the service in docker or in Portainer.

Hope this helps!

1 Like

Thanks so much Rebecca!

1 Like

Hello @rbilden,

I am unable to run the Containers by updating the Stack. Could you kindly help correct any errors ?

version: '3.7'
services:
  server:
    image: 'docker.pkg.github.com/bidmcdigitalpsychiatry/lamp-server/lamp-server:latest'
    environment:
      HTTPS: 'off'
      SCHEDULER: 'off'
      ROOT_KEY: 'xxxxx'
      CDB: 'https://admin:xxxx@database/'      
    networks:
      - public
    expose:
      - "3000"
    ports:
      - "3000:3000"
    deploy:
      mode: replicated
      labels:
        traefik.enable: 'true'
        traefik.http.routers.lamp_server.entryPoints: 'websecure'
        traefik.http.routers.lamp_server.rule: 'Host(`api.example.com`)'
        traefik.http.routers.lamp_server.tls.certresolver: 'default'
        traefik.http.services.lamp_server.loadbalancer.server.port: 3000
      placement:
        constraints:
          - node.role == manager
  database:
    image: apache/couchdb:latest
    volumes:
      - /data/couchdb:/opt/couchdb/data
    networks:
      - public
    environment:
       COUCHDB_USER: 'admin'
       COUCHDB_PASSWORD: 'xxxx'
    deploy:
      mode: replicated
      labels:
        traefik.enable: 'true'
        traefik.http.routers.lamp_db.entryPoints: 'websecure'
        traefik.http.routers.lamp_db.rule: 'Host(`db.example.com`)'
        traefik.http.routers.lamp_db.tls.certresolver: 'default'
        traefik.http.services.lamp_db.loadbalancer.server.port: 5984
      placement:
        constraints:
          - node.role == manager
networks:
  public:
    external: true

Hi Karthik,

image: 'docker.pkg.github.com/bidmcdigitalpsychiatry/lamp-server/lamp-server:latest'

This needs to be updated (see the first response of this thread above)

  CDB: 'https://admin:xxxx@database/'      

   traefik.http.routers.lamp_server.rule: 'Host(`api.example.com`)'

   traefik.http.routers.lamp_db.rule: 'Host(`db.example.com`)'

You need to update admin:xxxx@database, api.example.com, db.example.com to the actual name. :blush:

Hope this helps!

Rebecca

Thank you Rebecca!

I did update with the actual names but I am getting the following error even after creating “data” folder inside the root directory of the Virtual Machine.

Hi Karthik,

If you’re getting this error, it means that file system is not successfully shared in the docker container. Have you created a couchdb folder in the data folder?

Best,

Rebecca

Thanks Rebecca! Yes, I created the folder and updated the YML file to point to the /data/couchdb file. I had to update the CDB URL with port number inside environment as the following - CDB=https://admin:12345@database:5984/ now the containers are running but I see these below errors in the CouchDB Container…

Hi Karthik,

It looks like CouchDB is working–you should be able to use LAMP! You can ignore these error messages.

Best,

Rebecca

Additionally, because you were directly connecting to the container at its port, you should change https to http!

Awesome! That fixed all the errors and I was able to get the API endpoint up and running. Sorry one last question: I entered the couchdb password as password in this Interface but it’s not logging in.

Thank you so much, Rebbeca!

That is your database password–can you look in the console logs for your LAMP system administrator password?

Yes, I found the password in the Server Logs and was able to Login to LAMP.

Thank you for your swift assistance with this Rebbeca.

Much appreciated!

Best,
Karthik