Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

UI with discover scopes #125

Merged
merged 6 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ bin/
**/.vagrant
/cloud-config.cfg
db.db
ui/build/
10 changes: 10 additions & 0 deletions Dockerfile.backend
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# syntax=docker/dockerfile:1.2
FROM node:19-slim AS site-build

WORKDIR /app/ui-build

COPY ui .
RUN npm i
RUN npm run build

FROM golang:1.20.2-alpine AS builder

RUN apk add --update --no-cache gcc g++ git
Expand All @@ -24,5 +33,6 @@ FROM alpine:3.17
WORKDIR /app

COPY --from=builder ["/build/backend/backend", "./backend"]
COPY --from=site-build ["/app/ui-build/build", "site"]

ENTRYPOINT ["/app/backend"]
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ help: ## This help.
.DEFAULT_GOAL := help

.PHONY: build
build: build-all-go ## Build All
build: ui build-all-go ## Build All

.PHONY: build-all-go
build-all-go: backend cli ## Build All GO executables

.PHONY: ui
ui: ## Build UI
@(echo "Building UI ..." )
@(cd ui; npm i ; npm run build; )
@ls -l ui/build

.PHONY: backend
backend: ## Build Backend
@(echo "Building Backend ..." )
Expand Down Expand Up @@ -81,8 +87,12 @@ test: ## Run Unit Tests
clean-backend:
@(rm -rf backend/bin ; echo "Backend cleanup done" )

.PHONY: clean-ui
clean-ui:
@(rm -rf ui/build ; echo "UI cleanup done" )

.PHONY: clean
clean: clean-backend ## Clean all build artifacts
clean: clean-ui clean-backend ## Clean all build artifacts

bin/golangci-lint: bin/golangci-lint-${GOLANGCI_VERSION}
@ln -sf golangci-lint-${GOLANGCI_VERSION} bin/golangci-lint
Expand Down
Loading