diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index a5e45f0b..7a1ae80c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -32,7 +32,7 @@ jobs: - name: Build and push the docker image uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64 push: true tags: | timothyye/godns:latest diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2c503dbf..83bde96b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,7 +23,7 @@ jobs: name: Build the frontend project run: | cd web - npm install + npm ci npm run build cd .. go generate ./... diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ad6041be..52769bff 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -3,7 +3,7 @@ before: hooks: # build the frontend project - - npm install --prefix ./web + - npm ci --prefix ./web - npm run build --prefix ./web # You may remove this if you don't use go modules. - go mod tidy diff --git a/Dockerfile b/Dockerfile index 081b1862..538c97f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /web # Copy the Next.js project files into the image COPY ./web/package.json ./web/package-lock.json ./ # Install dependencies -RUN npm install +RUN npm ci # Copy the rest of the Next.js project files COPY ./web . # Build the Next.js project diff --git a/Makefile b/Makefile index 9519b6fb..f276dcb9 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,9 @@ BINARY=godns # Builds the project build: + npm ci --prefix ./web + npm run build --prefix ./web + go generate ./... GO111MODULE=on go build -ldflags "-X main.Version=${VERSION}" -o ${BINARY} cmd/godns/godns.go # Installs our project: copies binaries install: diff --git a/README.md b/README.md index 6864fa8c..524c136a 100644 --- a/README.md +++ b/README.md @@ -1195,11 +1195,15 @@ Contributions are welcome! Please feel free to submit a Pull Request. ### Setup the frontend development environment +Requirements: +* Node.js `18.19.0` or higher +* Go `1.17` or higher + The frontend project is built with [Next.js](https://nextjs.org/) and [daisyUI](https://daisyui.com/). To start the development environment, run: ```bash cd web -npm install +npm ci npm run dev ``` ### Build the frontend