Tugboat QA

Tugboat is a great option for scaling preview environments across your organization's tech stacks.

William Luisi
William Luisi
Dec 1, 2020 - 11:31AM
NodeJS
Engineering

NextJS App on Tugboat QA

.tugboat/config.yml
1services:
2 node:
3 image: tugboatqa/node:14
4 expose: 3000
5 commands:
6 build:
7 # We're already in the correct directory, so we can run npm install.
8 - npm install
9 # Run the NextJS production build.
10 - npm run build
11 start:
12 # Need to add the & at the end, to prevent tugboat qa from hanging
13 - npm start &
14 # Wait until the app is responding before Tugboat posts a link to the preview
15 - wget -O /dev/null -o /dev/null -t 240 --retry-connrefused localhost:3000