diff --git a/.github/workflows/docker-nft-ghostnet.yml b/.github/workflows/docker-nft-ghostnet.yml index 045f786..2520b1b 100644 --- a/.github/workflows/docker-nft-ghostnet.yml +++ b/.github/workflows/docker-nft-ghostnet.yml @@ -29,6 +29,13 @@ jobs: echo "date=$(date +%Y-%m-%dT%H-%M-%S)" >> "${GITHUB_OUTPUT}" echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}" + - name: Replace endpoint + id: sed + run: | + set -x + sed -i 's|http://localhost:8000|https://gas-station-api.gcp-npr.marigold.dev|g' /examples/nft/.env + cat /examples/nft/.env + - name: Set up Docker Buildx uses: docker/Setup-buildx-action@v2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f1f718d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/examples/nft/node_modules/ +/examples/nft/.svelte-kit/ \ No newline at end of file diff --git a/examples/nft/Dockerfile.ghostnet b/examples/nft/Dockerfile.ghostnet index 6e6e96f..75d2bcf 100644 --- a/examples/nft/Dockerfile.ghostnet +++ b/examples/nft/Dockerfile.ghostnet @@ -1,15 +1,15 @@ -# Stage 1 - the build process -FROM node:16 as build-deps +FROM node:16-alpine + WORKDIR /usr/src/app + COPY package*.json ./ RUN npm install + COPY . ./ -RUN npm run build -# Stage 2 - the production environment -FROM node:16-alpine -WORKDIR /usr/src/app -COPY --from=build-deps /usr/src/app . +RUN npm run build RUN npm install -g serve -EXPOSE 8000 -CMD ["serve", "-s", "build", "-l", "8000"] \ No newline at end of file + +EXPOSE 5173 + +CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"] \ No newline at end of file