0
私はスプリングブートアプリケーションとmysqlを別々のドッカーコンテナで実行しようとしていますが、ログが表示されないためデバッグに問題があります。私がdocker-compose up
を実行すると、起動ログ(Spring起動バナー)が表示され、アプリケーションの開始が表示されますが、それ以降はログは記録されません。私は私のエンドポイントの1つを打つ404を得ているが、ログを見ることなくそれをデバッグすることはできない。dockerはスプリングブートログを作成します
ドッキングウィンドウ-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
どのように私は仕事にログインするのですか?