我使用 dockerfile 部署Invoice Ninja,但无法访问 Invoice Ninja 页面。</p>
我尝试访问网址:http ://ninja.example.de:8080 /,但内容是Caddy 页面。
码头工人-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/invoiceninja/public
- ./storage:/var/invoiceninja/storage
depends_on:
- app
# Run webserver nginx on port 80
# Feel free to modify depending what port is already occupied
ports:
- "8080:80"
# - "443:443"
networks:
- invoiceninja
app:
image: invoiceninja/invoiceninja
restart: always
environment:
- APP_URL=ninja.example.de
- APP_KEY=base64:Iczfntb0PgJImdMW6PxMDeHi/v/h82yKv5xeYX3QvpU=
- MULTI_DB_ENABLED=false
- DB_HOST1=db
volumes:
- ./public:/var/invoiceninja/public
- ./storage:/var/invoiceninja/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:
docker-compose 日志结果:我看不到错误