Docker-compose installation encountering error, couldn't find env

While I already loaded the env file, with app key

Can someone point out the cause of error?

Hi,

I’m not sure, maybe the info here will help:

1 Like

Should the volume for public and storage be created before running the docker-compose yml file? Or will it be created upon running yml file?

If you are using the standard docker compose file it comes pre-prepared - however you DO need to init the permissions / ownership of those following to uid 1500.

the exact steps are container in the readme.

I’m doing this on my Qnap, using Portainer. I ssh’d into the NAS, and created a folder named Docker. Ninja folder inside Docker. Lastly, public and storage folder inside Ninja.

I have the following now:

drwxr-xr-x 2 myname everyone 40 2022-07-03 10:49 public/
drwxr-xr-x 2 myname everyone 40 2022-07-03 10:49 storage/

Are these correct?

Can someone take a look if I missed modifying anything in this yml file? 192.168.1.8 is my QNAP NAS IP

version: ‘3.7’

services:
server:
image: nginx
restart: always
env_file: env
volumes:
# Vhost configuration
#- ./config/caddy/Caddyfile:/etc/caddy/Caddyfiledocker-com
- ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
#- ./docker/app/public:/var/www/app/public:ro
- /share/Docker/Ninja/public:/var/www/app/public:ro
depends_on:
- app
# Run webserver nginx on port 80
# Feel free to modify depending what port is already occupied
ports:
- “90:80”
#- “443:443”
networks:
- invoiceninja
extra_hosts:
- "in5.localhost:192.168.0.124 " #host and ip

app:
image: invoiceninja/invoiceninja:5
env_file: env
restart: always
volumes:
- ./config/hosts:/etc/hosts:ro
- /share/Docker/Ninja/public:/var/www/app/public:rw,delegated
- /share/Docker/Ninja/storage:/var/www/app/storage:rw,delegated
depends_on:
- db
networks:
- invoiceninja
extra_hosts:
- "in5.localhost:192.168.0.124 " #host and ip

db:
image: mysql:5

ports:
  - "3305:3306"
restart: always
env_file: env
volumes:
  - ./docker/mysql/data:/var/lib/mysql:rw,delegated

  # remove comments for next 4 lines if you want auto sql backups
  #- ./docker/mysql/bak:/backups:rw
  #- ./config/mysql/backup-script:/etc/cron.daily/daily:ro
  #- ./config/mysql/backup-script:/etc/cron.weekly/weekly:ro
  #- ./config/mysql/backup-script:/etc/cron.monthly/monthly:ro
networks:
  - invoiceninja
extra_hosts:
  - "in5.localhost:192.168.0.124 " #host and ip

networks:
invoiceninja:

And this is my env file