docker compose发票忍者-错误500

docker compose发票忍者-错误500,docker,invoice-ninja,Docker,Invoice Ninja,我用docker compose在nginx反向代理后面安装了Invoice ninja,该代理还管理TLS证书 从日志中可以看出,所有初始化都正确,但当我导航到该站点时,只能看到500服务器错误 我提供了docker compose和日志,直到下面的第一个500错误 提前谢谢 docker compose.yml version: '3.7' services: server: image: caddy:alpine restart: always environ

我用docker compose在nginx反向代理后面安装了Invoice ninja,该代理还管理TLS证书

从日志中可以看出,所有初始化都正确,但当我导航到该站点时,只能看到500服务器错误

我提供了docker compose和日志,直到下面的第一个500错误

提前谢谢

docker compose.yml

version: '3.7'

services:
  server:
    image: caddy:alpine
    restart: always
    environment:
      - APP_URL=http://ninja.example.de
    volumes:
      # Vhost configuration
      - ./config/caddy/Caddyfile:/etc/caddy/Caddyfile
      - ./public:/var/www/app/public
      - ./storage:/var/www/app/storage
    depends_on:
      - app
    # Run webserver nginx on port 80
    # Feel free to modify depending what port is already occupied
    ports:
      - "127.0.0.1:4301:80"
    #  - "443:443"
    networks:
      - invoiceninja

  app:
    image: invoiceninja/invoiceninja:5
    restart: always
    environment:
      - APP_URL=ninja.example.de
      - APP_KEY=base64:mykeyxzy
      - MULTI_DB_ENABLED=false
      - DB_HOST1=db
    volumes:  
      - ./public:/var/www/app/public
      - ./storage:/var/www/app/storage
    depends_on:
      - db
    networks:
      - invoiceninja

  db:
    image: mysql:5
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=mypassword
      - MYSQL_USER=ninja
      - MYSQL_PASSWORD=ninja
      - MYSQL_DATABASE=db-ninja-01
    volumes:  
      - ./mysql/data:/var/lib/mysql
    networks:
      - invoiceninja

 # cron:
 # cron is commented out by me

volumes:
  mysql-data:
  public:
  storage:

networks:
  invoiceninja:

码头工人日志

server_1  | {"level":"info","ts":1590774949.786359,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
server_1  | {"level":"info","ts":1590774949.7946017,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
server_1  | {"level":"info","ts":1590774949.7968726,"logger":"http","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
server_1  | 2020/05/29 17:55:49 [INFO][cache:0xc00075e0a0] Started certificate maintenance routine
server_1  | {"level":"info","ts":1590774949.7995124,"logger":"tls","msg":"cleaned up storage units"}
server_1  | {"level":"info","ts":1590774949.799886,"msg":"autosaved config","file":"/config/caddy/autosave.json"}
server_1  | {"level":"info","ts":1590774949.799923,"msg":"serving initial configuration"}
app_1     | Configuration cache cleared!
app_1     | Configuration cached successfully!
app_1     | Route cache cleared!
app_1     | Routes cached successfully!
app_1     | Files cached successfully!
app_1     | [29-May-2020 17:55:49] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
app_1     | [29-May-2020 17:55:49] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
app_1     | [29-May-2020 17:55:49] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
app_1     | [29-May-2020 17:55:49] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
app_1     | [29-May-2020 17:55:49] NOTICE: fpm is running, pid 1
app_1     | [29-May-2020 17:55:49] NOTICE: ready to handle connections
db_1      | 2020-05-29 17:55:48+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.30-1debian10 started.
db_1      | 2020-05-29 17:55:48+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1      | 2020-05-29 17:55:48+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.30-1debian10 started.
db_1      | 2020-05-29T17:55:48.703457Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1      | 2020-05-29T17:55:48.708189Z 0 [Note] mysqld (mysqld 5.7.30) starting as process 1 ...
db_1      | 2020-05-29T17:55:48.714931Z 0 [Note] InnoDB: PUNCH HOLE support available
db_1      | 2020-05-29T17:55:48.714988Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1      | 2020-05-29T17:55:48.714995Z 0 [Note] InnoDB: Uses event mutexes
db_1      | 2020-05-29T17:55:48.714999Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
db_1      | 2020-05-29T17:55:48.715002Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db_1      | 2020-05-29T17:55:48.715011Z 0 [Note] InnoDB: Using Linux native AIO
db_1      | 2020-05-29T17:55:48.715701Z 0 [Note] InnoDB: Number of pools: 1
db_1      | 2020-05-29T17:55:48.716017Z 0 [Note] InnoDB: Using CPU crc32 instructions
db_1      | 2020-05-29T17:55:48.722484Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1      | 2020-05-29T17:55:48.741778Z 0 [Note] InnoDB: Completed initialization of buffer pool
db_1      | 2020-05-29T17:55:48.747111Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1      | 2020-05-29T17:55:48.763090Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
db_1      | 2020-05-29T17:55:48.798980Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1      | 2020-05-29T17:55:48.799233Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1      | 2020-05-29T17:55:48.832312Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1      | 2020-05-29T17:55:48.834307Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
db_1      | 2020-05-29T17:55:48.834434Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
db_1      | 2020-05-29T17:55:48.835099Z 0 [Note] InnoDB: Waiting for purge to start
db_1      | 2020-05-29T17:55:48.885461Z 0 [Note] InnoDB: 5.7.30 started; log sequence number 12488420
db_1      | 2020-05-29T17:55:48.886497Z 0 [Note] Plugin 'FEDERATED' is disabled.
db_1      | 2020-05-29T17:55:48.897039Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1      | 2020-05-29T17:55:48.906339Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
db_1      | 2020-05-29T17:55:48.906387Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
db_1      | 2020-05-29T17:55:48.907291Z 0 [Warning] CA certificate ca.pem is self signed.
db_1      | 2020-05-29T17:55:48.907356Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
db_1      | 2020-05-29T17:55:48.908141Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200529 17:55:48
db_1      | 2020-05-29T17:55:48.909168Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
db_1      | 2020-05-29T17:55:48.909863Z 0 [Note] IPv6 is available.
db_1      | 2020-05-29T17:55:48.909911Z 0 [Note]   - '::' resolves to '::';
db_1      | 2020-05-29T17:55:48.909952Z 0 [Note] Server socket created on IP: '::'.
db_1      | 2020-05-29T17:55:48.914971Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1      | 2020-05-29T17:55:48.932266Z 0 [Note] Event Scheduler: Loaded 0 events
db_1      | 2020-05-29T17:55:48.932616Z 0 [Note] mysqld: ready for connections.
db_1      | Version: '5.7.30'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
app_1     | 192.168.48.5 -  29/May/2020:17:59:07 +0000 "GET /index.php" 500

出现此错误的原因是应用程序无法正确确定传递的应用程序密钥
APP\u key
。应用程序缓存似乎有点不愿意刷新-这只是docker容器中的一个问题,而不是带docker的自主机选项

我将
最新
5
标签的更新推送到了。首先,请更新你的图片。这将修复某些权限,以获得对某些缓存文件夹的正确写入权限

然后在docker compose安装程序启动后,请运行

docker compose exec app php artisan config:cache

几次,然后刷新页面。刷新缓存之前需要一些时间和几个调用。然后,错误消息更改为
SQLSTATE[42S02]:找不到基表或视图:
这是一个已知问题,但可以通过导航到
/setup
来修复(目前),然后将运行正确的迁移。

FYI:caddy Web服务器已经处理TLS。您只需要提供一个FQDN作为APP_URL,该URL指向在上运行的服务器。要查看完整输出,请将APP_DEBUG=1添加到您的env vars中。您使用的是v5-第一次安装时仍然存在错误。请转到
/setup
-这将为您提供正确的安装说明。您好,谢谢。调试输出显示
(1/1)RuntimeException未指定任何应用程序加密密钥
,但我已生成一个应用程序密钥并将其粘贴到docker compose文件中。这意味着我无法访问/设置页面。完整输出在这里:这很奇怪。我会看一看然后回来。顺便说一句,这件事今天已经解决了。更新映像(!),您就不需要运行缓存刷新命令。这仅在版本5中修复吗?或者我们可以使用4.5.19吗?它也应该在最新的4.x版本中修复。我认为最新的Docked IN版本是4.5.18。明天我将创建一个新版本w/4.8.19