Is there a way to run IN:5 solely via a single docker-compose file? I’ve migrated (nearly) all of my docker containers over to be managed via Portainer, with the exception of Invoiceninja. Is it really mandatory to pull the git files and work with the folder permission?
I’ve been trying to set up IN:5 via Portainer, and while nginx and mysql seem to spin up just fine, the invoiceninja-container itself always runs into the following error:
cp: can’t create directory ‘/var/www/app/storage/app’: Permission denied
Whether I’m using volumes or have the directories mounted directly to the host, I can’t seem to get past this error.
This is what my compose file looks like:
version: ‘3.7’
services:
server:
image: nginx
container_name: invoiceninja_server
restart: always
volumes:
- app-public:/var/www/app/public:ro
depends_on:
- app
ports:
- “8085:80”
networks:
- invoiceninja
extra_hosts:
- “in5.localhost:192.168.100.25”app:
image: invoiceninja/invoiceninja:5
container_name: invoiceninja_app
restart: always
volumes:
- app-public:/var/www/app/public:rw,delegated
- app-storage:/var/www/app/storage:rw,delegated
environment:
- APP_URL=http://192.168.100.25:8085
- APP_KEY=base64:““MyKeyHere””
- APP_DEBUG=false
- REQUIRE_HTTPS=false
- PHANTOMJS_PDF_GENERATION=false
- PDF_GENERATOR=snappdf
- TRUSTED_PROXIES=‘*’
- DB_HOST=db
- DB_PORT=3310
- DB_DATABASE=ninja
- DB_USERNAME=ninja
- DB_PASSWORD=ninja
- MAIL_MAILER=log
- MAIL_HOST=smtp.mail.com
- MAIL_PORT=465
- MAIL_USERNAME=mailuser
- MAIL_PASSWORD=mailpassword
- MAIL_ENCRYPTION=ssl
- MAIL_FROM_ADDRESS=‘user@example.com’
- MAIL_FROM_NAME=‘Self Hosted User’
depends_on:
- db
networks:
- invoiceninja
extra_hosts:
- “in5.localhost:192.168.100.25”db:
image: mysql:8
container_name: invoiceninja_db
ports:
- “3310:3306”
restart: always
volumes:
- mysql-data:/var/lib/mysql:rw,delegated
environment:
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=ninja
networks:
- invoiceninja
extra_hosts:
- “in5.localhost:192.168.100.25”networks:
invoiceninja:volumes:
mysql-data:
app-public:
app-storage: