forked from zvdv/ECSS-Lockers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (24 loc) · 688 Bytes
/
Dockerfile
File metadata and controls
26 lines (24 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM golang:1.23.0-alpine3.20 AS gobuild
WORKDIR /locker
COPY go.mod go.sum ./
COPY /internal ./internal
COPY /cmd/app/ ./cmd/app/
RUN go mod tidy
RUN go build -o app ./cmd/app/main.go
FROM node:22-alpine3.19 AS nodebuild
WORKDIR /locker
COPY package.json package-lock.json index.css tailwind.config.js ./
COPY /internal/router ./internal/router
COPY /templates ./templates
RUN npm install
RUN npm run tw:buildonly
FROM alpine:3.20
WORKDIR /locker
COPY /templates ./templates
COPY /assets ./assets
COPY --from=gobuild /locker/app ./
COPY --from=nodebuild /locker/assets/css/index.css ./assets/css/index.css
RUN apk add --no-cache tzdata
ENV TZ=Canada/Pacific
EXPOSE 8080
CMD [ "./app" ]