SQLite mandatory environment variables for Docker Container

  docker, docker-compose, sqlite

Grasshopper is a php web application that connects to a Bticino home automation gateway.

The two recommended ways to use it is either using the RPI image provided with all components installed or install it on a Linux machine with a LASP (Php, apache, sqlite) or LESP (nginx, Php, sqlite) setup.

I try to set grasshopper up in docker-compose by creating two services, the db and the apache webserver. For the db I’ve tried using the nouchka/sqlite3 image and the keinos/sqlite3 one. Both unfortunately come without documentation and I can nowhere find the mandatory environment variable as root user, psw and so on.

what I do have now only loads the site without DB connection:

version: "3"
services:

  database:
    image: keinos/sqlite3 #nouchka/sqlite3
    #stdin_open: true
    #tty: true
    volumes:
      - ./db/:/root/db/
    restart: always


  webapp:
    build: .
            #context: .
            #dockerfile: Dockerfile-nginx
    ports:
      - "8080:80"
    depends_on: 
      - database
    restart: always

The Dockerfile:

FROM php:7.2-apache
COPY ./grasshopper_v5_application/ /var/www/html/

Grasshopper documentation: https://sourceforge.net/projects/grasshopperwebapp/files/Grasshopper%20V5%20Installation%20and%20Configuration%20Guide.pdf/download

Grasshopper files : https://sourceforge.net/projects/grasshopperwebapp/files/

Source: StackOverflow

LEAVE A COMMENT