File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -8,20 +8,20 @@ RUN go mod download
88
99COPY . .
1010
11- RUN CGO_ENABLED=1 GOOS=linux go build -o /app --tags "fts5" - a -ldflags '-linkmode external -extldflags "-static"' .
11+ RUN CGO_ENABLED=1 GOOS=linux go build -o ./build - a -ldflags '-linkmode external -extldflags "-static"'
1212
13- FROM busybox:1.36-musl
13+ FROM alpine:latest AS app
1414
15- RUN mkdir -p /etc/ssl/certs
15+ RUN apk --no-cache add ca-certificates tzdata bash
1616
17- COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
17+ ENV TZ= "Asia/Kolkata"
1818
19- COPY metaploy/naarad-api.metaploy.conf /
19+ WORKDIR /app
2020
21- COPY metaploy/postinstall.sh /
21+ COPY metaploy/ . /
2222
23- RUN chmod +x /postinstall.sh
23+ RUN chmod +x . /postinstall.sh
2424
25- COPY --from=builder /app /app
25+ COPY --from=builder /src/build .
2626
27- CMD ["/postinstall.sh" , "/app " ]
27+ CMD [". /postinstall.sh" , "./build " ]
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33cleanup () {
4- echo " Container stopped. Removing nginx configuration."
5- rm /etc/nginx/sites-enabled/naarad-api.metaploy.conf
4+ echo " Container stopped. Removing nginx configuration."
5+ rm /etc/nginx/sites-enabled/naarad-api.metaploy.conf
66}
77
88trap ' cleanup' SIGQUIT SIGTERM SIGHUP
99
1010" ${@ } " &
1111
12- cp /naarad-api.metaploy.conf /etc/nginx/sites-enabled
12+ cp . /naarad-api.metaploy.conf /etc/nginx/sites-enabled
1313
1414wait $!
15-
16- echo " lmao"
You can’t perform that action at this time.
0 commit comments