# Docker-compose: sqlite connection to phpliteadmin

**URL:** <https://discourse.nodered.org/t/docker-compose-sqlite-connection-to-phpliteadmin/49604>\
**Category:** General\
**Created:** [11 August 2021 07:58 UTC](https://discourse.nodered.org/t/docker-compose-sqlite-connection-to-phpliteadmin/49604 "2021-08-11T07:58:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![novski](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/novski/32/23243_2.png) [@novski](https://discourse.nodered.org/u/novski)\
**Post date:** [11 August 2021 07:58 UTC](https://discourse.nodered.org/t/docker-compose-sqlite-connection-to-phpliteadmin/49604/1 "2021-08-11T07:58:50Z")

</div>

I installed `node-red-node-sqlite` and started to configure my tables and so on but was quite slow so i decided to install phpliteadmin beside node-red:latest (by today 2.0.5) within docker-compose.  
But i don't understand how to configure docker-compose correctly to have access to the db file laying in `/data/sqlite.db` in my `node-red-data` volume.

the docker-compose.yaml file looks like this:

```auto
                                                                        
################################################################################
# Node-RED Stack or Compose
################################################################################
# docker stack deploy node-red --compose-file docker-compose-node-red.yml
# docker-compose -f docker-compose-node-red.yml -p myNoderedProject up
################################################################################
version: "3.7"

services:
  node-red:
    image: 'nodered/node-red:latest'
    environment:
      - 'TZ=Europe/Zurich'
      - 'NODE_ENV=production'
    network_mode: host
    ports:
      - '1880:1880'
    volumes:
      - 'node-red-data:/data'
    restart: 'always'

  phpliteadmin:
    image: 'vtacquet/phpliteadmin'
    hostname: phpliteadmin
    container_name: "phpliteadmin"
    volumes:
      - 'node-red-data:/data/sqlite.db'
    ports:
      - "1890:80"
    environment:
      - TZ=Europe/Zurich
      - PASSWORD=mypass

volumes:
  node-red-data:

```

While im able to connect to the phpliteadmin interface it does not show any database.  
Creating a database over the phpliteadmin interface shows a path `/db/testdatabase_sqlite`.  
Looking in to my node-red container i do not have a /db folder. So I think the `node-red-data` path of the two containers are not linked.  
I can't find resources online. Is there a better way to get a db admin tool for sqlite beside node-red?  
Is it even possible to link a containers volume to another?

---

<div class="post-metadata">

**Author:** ![Jean-Luc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jean-luc/32/89996_2.png) [@Jean-Luc](https://discourse.nodered.org/u/Jean-Luc)\
**Post date:** [12 August 2021 20:11 UTC](https://discourse.nodered.org/t/docker-compose-sqlite-connection-to-phpliteadmin/49604/2 "2021-08-12T20:11:07Z")

</div>

Hello @novski

May be a start, look at the end of my [post](https://discourse.nodered.org/t/nodered-in-docker/49638/4) to see where the files are.

On the other hand I don't understand your volume mapping in the yaml of the phpliteadmin container?

For example, when I created my SQLite database, it is by default under /_var/www/html/database/xxxx.db_  
Not under /data

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 October 2021 20:11 UTC](https://discourse.nodered.org/t/docker-compose-sqlite-connection-to-phpliteadmin/49604/3 "2021-10-11T20:11:48Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
