Skip to content

Commit

Permalink
infra: add dockerfile and cd pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilevos committed Oct 25, 2023
1 parent 4cbec17 commit 396ca80
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/docker-nft-ghostnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/examples/nft/node_modules/
/examples/nft/.svelte-kit/
18 changes: 9 additions & 9 deletions examples/nft/Dockerfile.ghostnet
Original file line number Diff line number Diff line change
@@ -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"]

EXPOSE 5173

CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"]

0 comments on commit 396ca80

Please sign in to comment.