Minimum required Node.js version is 18. #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Dockerfile | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE. | |
- uses: actions/checkout@v4 | |
- name: Build Dockerfile | |
run: docker build . -t plotly | |
- name: Start Docker container | |
run: | | |
CONTAINER_ID=$(docker run --rm -d -p 3000:3000 --net=host plotly) | |
while ! netstat -tna | grep LISTEN | grep --silent 3000 | |
do | |
echo Waiting for Node.js server to start ... | |
sleep 5 | |
done | |
netstat -tulpen | |
docker logs "$CONTAINER_ID" | |
curl -X POST -i 'http://[::1]:3000/' --data '{ "x": ["2013-10-04 22:23:00", "2013-11-04 22:23:00", "2013-12-04 22:23:00"], "y": [1, 3, 6], "type": "scatter" }' | |
echo -e "\nStopping container ..." | |
docker stop -t 1 "$CONTAINER_ID" |