Setup hasura endpoint as environment variable:
echo NEXT_PUBLIC_URL=http://<hasura>/v1/graphql >> .env.local
Install requirenments:
npm i
Start:
yarn dev
or with prod build:
yarn build
yarn start
Pulling a current image, passing environment from file, and run container on http://localhost:3000 .
docker run -p 0.0.0.0:3000:3000 --env-file .env.local --rm ghcr.io/contextmachine/cxm-shipping:latest
Build local image, create container and run it:
DOCKER_BUILDKIT=1 docker build -t shipping-test . && docker run -p 0.0.0.0:3000:3000 --env-file .env.local --rm shipping-test
or:
# make script executable
chmod +x build.sh
# run script
./build.sh