0
我試圖在單獨的碼頭集裝箱中運行一個彈簧啓動應用程序和MySQL,我無法調試問題,因爲我看不到任何日誌。當我運行docker-compose up
時,我看到啓動日誌(Spring Boot橫幅)並查看應用程序啓動,但在此之後不再有日誌記錄。我得到了一個404命中我的一個終點,但我不能在沒有看到日誌的情況下進行調試。泊塢窗撰寫彈簧啓動日誌
泊塢窗,compose.yml:
version: "3.3"
services:
database:
build:
context: ./database
image: pensionator_db
# set default mysql root password, change as needed
environment:
MYSQL_USER: pensionatoruser
MYSQL_DATABASE: pensionatordb
# Expose port 3306 to host. Not for the application but
# handy to inspect the database from the host machine.
ports:
- "3306:3306"
restart: always
appserver:
build:
context: .
dockerfile: app/src/main/docker/Dockerfile
image: pensionator_app
# mount point for application in tomcat
# open ports for tomcat and remote debugging
ports:
- "8080:8080"
- "8000:8000"
restart: always
我該如何記錄工作?