Skip to content

Commit

Permalink
Fixed build issues for Vite (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelZhao21 authored Mar 21, 2024
1 parent 2016a6d commit a6993e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# STEP 0: Statically build node client
FROM node:lts-hydrogen as client-builder
WORKDIR /client
COPY client/public public
COPY client/src src
COPY client ./
COPY ["client/package.json", "client/tailwind.config.js", "client/tsconfig.json", "./"]

ARG NODE_ENV=production
ARG VITE_JURY_NAME
ARG VITE_HUB
ARG VITE_JURY_URL

RUN yarn install

ARG NODE_ENV=production
RUN yarn build

# STEP 1: Compile backend
Expand Down
2 changes: 1 addition & 1 deletion server/router/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func NewRouter(db *mongo.Database) *gin.Engine {
adminRouter.POST("/admin/timer", SetJudgingTimer)

// Serve frontend static files
router.Use(static.Serve("/static", static.LocalFile("./public/static", true)))
router.Use(static.Serve("/assets", static.LocalFile("./public/assets", true)))
router.StaticFile("/favicon.ico", "./public/favicon.ico")
router.LoadHTMLFiles("./public/index.html")

Expand Down

0 comments on commit a6993e1

Please sign in to comment.