Originally posted by **joebrands** August 27, 2024
Hello! I believe I have sucessfully installed Benotes and the DB and ran `php artisan install` as well as `hown -R www-data:www-data storage && chmod -R 774 storage` to be sure which both worked fine with no errors. The only error I get is on startup it throws a `Database migration failed.` and is also the only thing logged in the laravel.log.
The issue is when I go to the web ui and try to log in with the admin user I setup, the login button does nothing. I can see the POST and GET (shown below) in the app log but nothing else happens. No errors that I can find either.
I used a compose stack outlined below being run on an Unraid system. I am using bind mounts right now but I tested also with the default volume mounts and had the same problem. Ive also tested local and now behind my proxy with the same results. I have `debug=true` but I cant seem to see any difference that it makes. I would appreciate any additional troubleshooting help.
compose
```services:
app:
container_name: benotes_app
image: fr0tt/benotes:latest
restart: unless-stopped
environment:
DB_CONNECTION: ${DB_CONNECTION}
ports:
- ${APP_PORT}:80
volumes:
- .env:/var/www/.env
- ${APP_DATA}/storage/app/public/thumbnails:/var/www/storage/app/public/thumbnails
- ${APP_DATA}/storage/backup:/var/www/storage/backup
- ${APP_DATA}/storage/logs:/var/www/storage/logs
db:
container_name: benotes_db
image: postgres:15.2-alpine
restart: unless-stopped
environment:
POSTGRES_DATABASE: ${DB_DATABASE}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- ${DB_PORT}
volumes:
- ${APP_DATA}/db:/var/lib/postgresql/data
```
.env
```APP_NAME=Benotes
APP_ENV=production
APP_PORT=3053
APP_DEBUG=true
APP_URL=https://notes.[mydomain].com
APP_TIMEZONE=UTC
APP_DATA=/mnt/user/appdata/benotes
APP_KEY=[Hidden]
JWT_SECRET=[Hidden]
GENERATE_MISSING_THUMBNAILS=true
USE_FILESYSTEM=true
TRUSTED_PROXIES=*
DB_CONNECTION=pgsql
DB_HOST=db
DB_PORT=5432
DB_DATABASE=benotes
DB_USERNAME=benotes
DB_PASSWORD=benotes
CACHE_DRIVER=file
MAIL_DRIVER=smtp
MAIL_HOST=
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME="Benotes"
JWT_ALGO=HS256
```
benotes_app log
```[27-Aug-2024 20:08:26] NOTICE: fpm is running, pid 17
[27-Aug-2024 20:08:26] NOTICE: ready to handle connections
Migrate database...
Database migration failed. Try again...
Database migration failed. Try again...
Database migration failed. Try again...
Database migration failed.
2024-08-27 20:08:25,765 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-08-27 20:08:25,772 INFO supervisord started with pid 14
2024-08-27 20:08:26,777 INFO spawned: 'cron' with pid 15
2024-08-27 20:08:26,781 INFO spawned: 'nginx' with pid 16
2024-08-27 20:08:26,786 INFO spawned: 'php-fpm' with pid 17
2024-08-27 20:08:27,923 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-08-27 20:08:27,924 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-08-27 20:08:27,924 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
127.0.0.1 - 27/Aug/2024:20:11:17 +0000 "GET /index.php" 200
192.168.0.19 - - [27/Aug/2024:20:11:17 +0000] "GET / HTTP/1.1" 200 812 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
192.168.0.19 - - [27/Aug/2024:20:11:17 +0000] "GET /css/inter.css HTTP/1.1" 200 5654 "https://notes.[mydomain].com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
192.168.0.19 - - [27/Aug/2024:20:11:17 +0000] "GET /css/app.css?id=c96f213a8fd919bdba321ca0a4bd8bd0 HTTP/1.1" 200 25980 "https://notes.[mydomain].com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
192.168.0.19 - - [27/Aug/2024:20:11:17 +0000] "GET /fonts/Inter-Regular.woff2?v=3.19 HTTP/1.1" 200 98868 "https://notes.[mydomain].com/css/inter.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
192.168.0.19 - - [27/Aug/2024:20:11:17 +0000] "GET /fonts/Inter-SemiBold.woff2?v=3.19 HTTP/1.1" 200 105804 "https://notes.[mydomain].com/css/inter.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
127.0.0.1 - 27/Aug/2024:20:11:17 +0000 "GET /index.php" 500
192.168.0.19 - - [27/Aug/2024:20:11:17 +0000] "GET /api/auth/me HTTP/1.1" 500 6634 "https://notes.[mydomain].com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
192.168.0.19 - - [27/Aug/2024:20:11:18 +0000] "GET /service-worker.js HTTP/1.1" 200 25072 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
127.0.0.1 - 27/Aug/2024:20:11:31 +0000 "POST /index.php" 500
192.168.0.19 - - [27/Aug/2024:20:11:31 +0000] "POST /api/auth/login HTTP/1.1" 500 6628 "https://notes.[mydomain].com/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" "102.165.16.78"
```
benotes_db log
```2024-08-27 20:08:07.486 UTC [1] LOG: starting PostgreSQL 15.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
2024-08-27 20:08:07.487 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-08-27 20:08:07.487 UTC [1] LOG: listening on IPv6 address "::", port 5432
2024-08-27 20:08:07.518 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-08-27 20:08:07.556 UTC [24] LOG: database system was shut down at 2024-08-26 02:49:13 UTC
2024-08-27 20:08:07.595 UTC [1] LOG: database system is ready to accept connections
2024-08-27 20:13:07.601 UTC [22] LOG: checkpoint starting: time
2024-08-27 20:13:07.665 UTC [22] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.007 s, sync=0.015 s, total=0.065 s; sync files=2, longest=0.008 s, average=0.008 s; distance=0 kB, estimate=0 kB
PostgreSQL Database directory appears to contain a database; Skipping initialization
```
Discussed in https://github.com/fr0tt/benotes/discussions/108