dockerfiles
dockerfiles copied to clipboard
500 - Server Error Back <localhost>
Setup information
I used this video to setup invoiceninja/docker https://www.youtube.com/watch?v=xo6a3KtLC2g
- Ubuntu 22.10 LTS (64 bit)
- Rpi 4 (8GB)
- Client: Docker Engine - Community Version: 23.0.1 API version: 1.42 Go version: go1.19.5 Git commit: a5ee5b1 Built: Thu Feb 9 19:46:49 2023 OS/Arch: linux/arm64 Context: default
- invoiceninja/docker v5
Describe the bug
After setup of invoiceninja/docker following this video https://www.youtube.com/watch?v=xo6a3KtLC2g I go to http://10.10.1.3:8010 an oversized background image of a invoiceninja loads. At the bottom of the page there is a url that says "500 - Server Error Back 10.10.1.3" when I click on the link it takes me to http://10.10.1.3:8010/client with the same background image and error at the bottom of the page.
To reproduce
Steps to reproduce the behavior:
- Install Ubuntu 22.10 LTS (64 bit) on Rpi4
- Install Docker
- Install docker-compose
- Install Portainer
- Follow this video https://www.youtube.com/watch?v=xo6a3KtLC2g
Screenshots/logs
Screenshots of load screen ( I had to zoom in to get it to fit and s take a screenshot) and Portainer showing the 3 containers that were created during setup. https://i.imgur.com/TgZ6LtN.png https://i.imgur.com/Vog1wxC.png
Log Files
dockerfiles-db-1.log
2023-03-28T14:31:39.097097991Z 2023-03-28 14:31:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.
2023-03-28T14:31:39.887614029Z 2023-03-28 14:31:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-03-28T14:31:39.925300793Z 2023-03-28 14:31:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.
2023-03-28T14:31:40.805140147Z '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2023-03-28T14:31:41.591960755Z 2023-03-28T14:31:41.575893Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2023-03-28T14:31:41.592047477Z 2023-03-28T14:31:41.582677Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
2023-03-28T14:31:41.606416337Z 2023-03-28T14:31:41.605960Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-03-28T14:31:42.900450837Z 2023-03-28T14:31:42.899987Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-03-28T14:31:43.602217601Z 2023-03-28T14:31:43.600287Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-03-28T14:31:43.602301601Z 2023-03-28T14:31:43.600439Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-03-28T14:31:43.629304011Z 2023-03-28T14:31:43.628004Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2023-03-28T14:31:43.731139488Z 2023-03-28T14:31:43.730776Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-03-28T14:31:43.732448836Z 2023-03-28T14:31:43.732099Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2023-03-28T15:03:29.853569308Z 2023-03-28T15:03:29.853166Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user
dockerfiles-app-1
[28-Mar-2023 15:04:19] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[28-Mar-2023 15:04:19] NOTICE: fpm is running, pid 54
[28-Mar-2023 15:04:19] NOTICE: ready to handle connections
2023-03-28 15:04:20,299 INFO success: shutdown entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-03-28 15:04:20,300 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-03-28 15:04:20,300 INFO success: queue-worker_00 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-03-28 15:04:20,302 INFO success: queue-worker_01 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-03-28 15:04:20,303 INFO success: scheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
172.20.0.4 - 28/Mar/2023:15:04:28 +0000 "GET /index.php" 500
172.20.0.4 - 28/Mar/2023:15:04:35 +0000 "GET /index.php" 500
2023-03-28 15:05:01 Running [queue-size-job] ..................... 92ms DONE
2023-03-28 15:05:01 Running [Callback] .......................... 138ms DONE
2023-03-28 15:05:02 App\Jobs\Ninja\QueueSize ....................... RUNNING
2023-03-28 15:05:02 App\Jobs\Ninja\QueueSize .................. 47.13ms DONE
172.20.0.4 - 28/Mar/2023:15:05:23 +0000 "GET /index.php" 500
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
2023-03-28 15:10:01 Running [queue-size-job] ..................... 88ms DONE
2023-03-28 15:10:01 Running [task-scheduler-job] ................. 48ms DONE
2023-03-28 15:10:01 Running [Callback] ........................... 47ms DONE
2023-03-28 15:10:03 App\Jobs\Ninja\QueueSize ....................... RUNNING
2023-03-28 15:10:03 App\Jobs\Ninja\QueueSize .................. 28.29ms DONE
2023-03-28 15:10:03 App\Jobs\Ninja\TaskScheduler ................... RUNNING
2023-03-28 15:10:03 App\Jobs\Ninja\TaskScheduler .............. 63.15ms DONE
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
2023-03-28 15:15:01 Running [queue-size-job] ..................... 89ms DONE
2023-03-28 15:15:01 Running [Callback] ........................... 54ms DONE
2023-03-28 15:15:04 App\Jobs\Ninja\QueueSize ....................... RUNNING
2023-03-28 15:15:04 App\Jobs\Ninja\QueueSize .................. 40.27ms DONE
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
2023-03-28 15:20:01 Running [queue-size-job] .................... 112ms DONE
2023-03-28 15:20:01 Running [Callback] ........................... 50ms DONE
2023-03-28 15:20:01 App\Jobs\Ninja\QueueSize ....................... RUNNING
2023-03-28 15:20:01 App\Jobs\Ninja\QueueSize .................. 24.07ms DONE
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
2023-03-28 15:25:01 Running [queue-size-job] ..................... 83ms DONE
2023-03-28 15:25:01 Running [Callback] ........................... 47ms DONE
2023-03-28 15:25:02 App\Jobs\Ninja\QueueSize ....................... RUNNING
2023-03-28 15:25:02 App\Jobs\Ninja\QueueSize .................. 25.58ms DONE
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
2023-03-28 15:30:01 Running [queue-size-job] ..................... 65ms DONE
2023-03-28 15:30:01 Running [stale-invoice-job] .................. 42ms DONE
2023-03-28 15:30:01 Running [Callback] ........................... 49ms DONE
2023-03-28 15:30:03 App\Jobs\Ninja\QueueSize ....................... 2023-03-28 15:30:03 App\Jobs\Subscription\CleanStaleInvoiceOrder RUNNING
... RUNNING
2023-03-28 15:30:03 App\Jobs\Ninja\QueueSize .................. 25.52ms DONE
2023-03-28 15:30:03 App\Jobs\Subscription\CleanStaleInvoiceOrder 34.13ms DONE
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
2023-03-28 15:35:01 Running [queue-size-job] ..................... 79ms DONE
2023-03-28 15:35:01 Running [Callback] ........................... 49ms DONE
2023-03-28 15:35:04 App\Jobs\Ninja\QueueSize ....................... RUNNING
2023-03-28 15:35:04 App\Jobs\Ninja\QueueSize .................. 23.78ms DONE
dockerfiles-server-1 10.10.1.212 - - [28/Mar/2023:14:33:50 +0000] "GET /client HTTP/1.1" 500 5340 "http://10.10.1.3:8010/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" "-" 10.10.1.212 - - [28/Mar/2023:14:33:56 +0000] "GET /client HTTP/1.1" 500 5340 "http://10.10.1.3:8010/client" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" "-" 10.10.1.212 - - [28/Mar/2023:14:36:41 +0000] "GET / HTTP/1.1" 500 5335 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" "-" 10.10.1.212 - - [28/Mar/2023:14:41:51 +0000] "GET / HTTP/1.1" 500 5335 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" "-" 2023/03/28 15:04:09 [notice] 1#1: signal 3 (SIGQUIT) received, shutting down 2023/03/28 15:04:09 [notice] 24#24: gracefully shutting down 2023/03/28 15:04:09 [notice] 24#24: exiting 2023/03/28 15:04:09 [notice] 26#26: gracefully shutting down 2023/03/28 15:04:09 [notice] 24#24: exit 2023/03/28 15:04:09 [notice] 26#26: exiting 2023/03/28 15:04:09 [notice] 26#26: exit 2023/03/28 15:04:09 [notice] 25#25: gracefully shutting down 2023/03/28 15:04:09 [notice] 27#27: gracefully shutting down 2023/03/28 15:04:09 [notice] 25#25: exiting 2023/03/28 15:04:09 [notice] 27#27: exiting 2023/03/28 15:04:09 [notice] 25#25: exit 2023/03/28 15:04:09 [notice] 27#27: exit 2023/03/28 15:04:09 [notice] 1#1: signal 17 (SIGCHLD) received from 24 2023/03/28 15:04:09 [notice] 1#1: worker process 24 exited with code 0 2023/03/28 15:04:09 [notice] 1#1: worker process 25 exited with code 0 2023/03/28 15:04:09 [notice] 1#1: signal 29 (SIGIO) received 2023/03/28 15:04:09 [notice] 1#1: signal 17 (SIGCHLD) received from 26 2023/03/28 15:04:09 [notice] 1#1: worker process 26 exited with code 0 2023/03/28 15:04:09 [notice] 1#1: worker process 27 exited with code 0 2023/03/28 15:04:09 [notice] 1#1: exit /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Configuration complete; ready for start up 2023/03/28 15:04:11 [notice] 1#1: using the "epoll" event method 2023/03/28 15:04:11 [notice] 1#1: nginx/1.23.3 2023/03/28 15:04:11 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6) 2023/03/28 15:04:11 [notice] 1#1: OS: Linux 5.19.0-1004-raspi 2023/03/28 15:04:11 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 2023/03/28 15:04:11 [notice] 1#1: start worker processes 2023/03/28 15:04:11 [notice] 1#1: start worker process 22 2023/03/28 15:04:11 [notice] 1#1: start worker process 23 2023/03/28 15:04:11 [notice] 1#1: start worker process 24 2023/03/28 15:04:11 [notice] 1#1: start worker process 25 10.10.1.212 - - [28/Mar/2023:15:04:30 +0000] "GET / HTTP/1.1" 500 5335 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" "-" 10.10.1.212 - - [28/Mar/2023:15:04:35 +0000] "GET /client HTTP/1.1" 500 5340 "http://10.10.1.3:8010/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" "-" 10.10.1.212 - - [28/Mar/2023:15:05:23 +0000] "GET /client HTTP/1.1" 500 5340 "http://10.10.1.3:8010/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" "-"
Config Files
docker-compose.yaml 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 depends_on: - app # Run webserver nginx on port 80 # Feel free to modify depending what port is already occupied ports: - "8010:80" - "4430:443" networks: - invoiceninja
app: image: invoiceninja/invoiceninja:5 env_file: env restart: always volumes: - ./config/hosts:/etc/hosts:ro - ./docker/app/public:/var/www/app/public:rw,delegated - ./docker/app/storage:/var/www/app/storage:rw,delegated depends_on: - db enviroment: - PUID=1000 - PGID=1003 networks: - invoiceninja
db: image: mysql:8
When running on ARM64 use MariaDB instead of MySQL
image: mariadb:10.4
For auto DB backups comment out image and use the build block below
build:
context: ./config/mysql
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
THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
cron:
image: invoiceninja/invoiceninja:alpine-4
volumes:
# - ./docker/app/public:/var/www/app/public:rw,delegated
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
# - ./docker/app/public/logo:/var/www/app/public/logo:rw,delegated
entrypoint: |
/bin/sh -c 'sh -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
sleep 300s
while /bin/true; do
./artisan ninja:send-invoices
./artisan ninja:send-reminders
sleep 1d
done
EOF'
networks:
- invoiceninja
networks: invoiceninja:
env file
IN application vars
APP_URL=http://10.10.1.3:8003 APP_KEY=<my_app_key> APP_DEBUG=true REQUIRE_HTTPS=false PHANTOMJS_PDF_GENERATION=false PDF_GENERATOR=snappdf TRUSTED_PROXIES='*'
QUEUE_CONNECTION=database
DB connection
DB_HOST=db DB_PORT=3306 DB_DATABASE=ninja DB_USERNAME=ninja DB_PASSWORD=ninja
Create initial user
Default to these values if empty
[email protected]
IN_PASSWORD=changeme!
IN_USER_EMAIL=<my_email_address> IN_PASSWORD=<my_passowrd>
Mail options
MAIL_MAILER=log MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=<my_email_address> MAIL_PASSWORD=<my_password> MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS='<my_email_address>' MAIL_FROM_NAME='Invoice Ninja'
MySQL
MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword MYSQL_USER=ninja MYSQL_PASSWORD=ninja MYSQL_DATABASE=ninja
V4 env vars
DB_STRICT=false
APP_CIPHER=AES-256-CBC
Additional context Add any other context about the problem here.