Skip to content

Commit

Permalink
hotfix: nova broken ci (#1421)
Browse files Browse the repository at this point in the history
* hotfix: nova broken ci

* fix: revert dockerfiles to og state and update setup:dev script

---------

Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
  • Loading branch information
VmMad and begonaalvarezd authored Apr 22, 2024
1 parent 0de6083 commit d8a9ece
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 35 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/nova-build-temp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ jobs:
name: Set Environment Variables
runs-on: ubuntu-latest
outputs:
version_tag: ${{ steps.env_vars.outputs.version_tag }}
version_tag: ${{ steps.set_version_tag.outputs.version_tag }}
steps:
- name: Set up the version tag for docker images and deploy environment
id: env_vars
- name: Checkout
uses: actions/checkout@v2

- name: Set up the version tag for docker images
id: set_version_tag
run: |
COMMIT_HASH=$(git rev-parse --short HEAD)
echo "VERSION_TAG=$COMMIT_HASH" >> $GITHUB_ENV
echo "VERSION_TAG=$COMMIT_HASH" >> $GITHUB_OUTPUT
use-reusable-workflow:
strategy:
Expand Down
22 changes: 2 additions & 20 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
FROM node:16.20.2-bullseye

## Include the build tools for any npm packages that rebuild
RUN apt-get update && apt-get install -y \
build-essential \
pkg-config \
libssl-dev \
libudev-dev \
cmake \
clang \
curl \
git \
python3 \
&& rm -rf /var/lib/apt/lists/*
RUN apt install git curl python3

# Working DIR
WORKDIR /usr/src/app

# Copy everything from current Folder
# COPY . ./

# Copy iota-sdk-nova deps REMOVE THIS for prod
# Get Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="${PATH}:/root/.cargo/bin"

COPY ./api ./
COPY ./iota-sdk/ ../iota-sdk/
COPY . ./

# Set the env variables
ARG CONFIG_ID
Expand Down
12 changes: 2 additions & 10 deletions client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,7 @@ RUN apt-get update && apt-get install -y \
WORKDIR /usr/src/app

# Copy everything from current Folder
# COPY . ./

# Copy iota-sdk-nova deps REMOVE THIS for prod
# Get Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="${PATH}:/root/.cargo/bin"

COPY ./client ./
COPY ./iota-sdk/ ../iota-sdk/
COPY . ./

# A minimal NGINX configuration
RUN echo 'server {\
Expand All @@ -40,4 +32,4 @@ RUN npm run build
EXPOSE 80

# Serve the prod build
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"setup:client": "cd client && npm install && npm run postinstall",
"setup:api": "cd api && npm install && npm run build-compile && npm run build-config",
"setup:dev": "npm run clear && npm run setup:sdk-nova-local && npm run prepare && npm run setup:client && npm run setup:api",
"setup:dev": "npm run clear && npm run prepare && npm run setup:client && npm run setup:api",
"setup:dev-build-sdk": "npm run clear && npm run setup:sdk-nova-local && npm run prepare && npm run setup:client && npm run setup:api",
"clear": "rimraf api/node_modules api/dist client/node_modules client/build",
"dev": "concurrently 'cd api && npm run start-dev' 'cd client && npm run start'",
"prepare": "husky install",
Expand Down

0 comments on commit d8a9ece

Please sign in to comment.