AWS ECS에서 도커를 사용하여 Create-Reaction-App을 배포하고 있습니다. Dockerhub 이미지를 사용하여 테스트하고 있습니다.이 이미지는 거의 create-react-app의 주식 버전입니다. 작업을 시작할 때 컨테이너 이미지를 가져 와서 도커 컨테이너를 시작할 수 있지만 실행중인 반응 스크립트 시작시 중단됩니다. 컨테이너 로그에서 볼 수있는 것은 다음과 같습니다.반응 스크립트를 디버깅하는 방법은 무엇입니까?
01:51:38 npm info it worked if it ends with ok
01:51:38 npm info using [email protected]
01:51:38 npm info using [email protected]
01:51:42 npm info prestart [email protected]
01:51:42 npm info start [email protected]
01:51:42 > [email protected] start /usr/src/app
01:51:42 > react-scripts start
01:52:06 Starting the development server...
단지 멈추지 않고 끝내지 않습니다. 내가 수동으로 고정 표시기 컨테이너를 실행할 때, 모든 것이 잘 작동 :
Starting the development server...
Compiled successfully!
The app is running at:
http://localhost:3000/
내 Dockerfile은 다음과 같습니다
FROM node:4-onbuild
# Prepare app directory
RUN mkdir -p /usr/src/app
ADD . /usr/src/app
# Install dependencies
WORKDIR /usr/src/app
RUN npm install
# Build the app
RUN npm build
# Expose the app port
EXPOSE 3000
# Start the app
CMD npm start --loglevel debug
내 package.json
:"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
가하는 방법에 대한 조언을 찾고 디버그 또는 내가 할 수있는 추가 로깅이 있다면, 고마워!
해결책을 게시하기 위해 다시 방문해 주셔서 감사합니다. 방금 날 구해 줬어. 나는 약 1 주일 동안 해결책을 찾고 있었다. – andrewcopp