aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-01-28 00:16:53 +0000
committerterminaldweller <devi@terminaldweller.com>2024-01-28 00:16:53 +0000
commita9719bf9d782ffb2529fe364a1780416be0a2b75 (patch)
tree410bb75b4659db34cc16f03142c113d834d5027f
parentusing the example from example/basic for an example pocketbase server (diff)
downloadsms-webhook-a9719bf9d782ffb2529fe364a1780416be0a2b75.tar.gz
sms-webhook-a9719bf9d782ffb2529fe364a1780416be0a2b75.zip
removed exta uselss git clone line
-rw-r--r--Dockerfile1
-rw-r--r--main.go11
2 files changed, 3 insertions, 9 deletions
diff --git a/Dockerfile b/Dockerfile
index a652540..3ccbd54 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,6 @@
FROM alpine:3.19 as builder
RUN apk update && apk upgrade && \
apk add go git
-RUN git clone https://github.com/terminaldweller/sms-webhook
WORKDIR /sms-webhook
COPY go.sum go.mod /sms-webhook/
RUN go mod download
diff --git a/main.go b/main.go
index 6e187cb..52d168d 100644
--- a/main.go
+++ b/main.go
@@ -116,14 +116,6 @@ func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) {
}
}
-// func main() {
-// app := pocketbase.New()
-
-// if err := app.Start(); err != nil {
-// log.Fatal(err)
-// }
-// }
-
func defaultPublicDir() string {
if strings.HasPrefix(os.Args[0], os.TempDir()) {
return "./pb_public"
@@ -244,13 +236,16 @@ func main() {
app.OnAfterBootstrap().PreAdd(func(e *core.BootstrapEvent) error {
app.Dao().ModelQueryTimeout = time.Duration(queryTimeout) * time.Second
+
return nil
})
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
e.Router.GET("/*", apis.StaticDirectoryHandler(os.DirFS(publicDir), indexFallback))
+
return nil
})
+
if err := app.Start(); err != nil {
log.Fatal(err)
}