mirror of https://github.com/jlelse/GoBlog
Only set memory limit using env in Dockerfile
This commit is contained in:
parent
c559cf7ea9
commit
ea0f1bfe05
|
@ -31,6 +31,7 @@ EXPOSE 443
|
|||
EXPOSE 8080
|
||||
CMD ["GoBlog"]
|
||||
HEALTHCHECK --interval=1m --timeout=10s CMD GoBlog healthcheck
|
||||
ENV GOMEMLIMIT=100MiB
|
||||
RUN apk add --no-cache tzdata tor
|
||||
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main sqlite-dev
|
||||
COPY templates/ /app/templates/
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
func initGC() {
|
||||
// Set memory limit to 100 MB
|
||||
debug.SetMemoryLimit(100 * 1000 * 1000)
|
||||
}
|
Loading…
Reference in New Issue