Compare commits
5 Commits
cab2c8e99a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cffa66144 | |||
| e505ddbdfc | |||
| 7f670e31ff | |||
| 584a2413ab | |||
| 0b08960575 |
4
.env
4
.env
@@ -1,4 +0,0 @@
|
||||
|
||||
OPENROUTER_API_KEY=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
|
||||
WHATSAPP_PHONE_ID=986583417873961
|
||||
WHATSAPP_TOKEN=EAATqIU03y9YBQ1DnscXkt0QQ8lfhWQbI8TT0wRNdB9ZAGLWEdPhN3761E0XBXBdzJiZA3uiPEugjhIS1TjrUZCu979aiiSYFvjbDjFRFYGVsGfqIZCB13H6AaviQHlBNksil9JlkefZAy4ZBFqZCkAcYGjGNtZBWHaXZCaMYTMmfn7rOAx4IUt6eHjfiVkXVquOoqDQY8oVOs5HAekLWNZBqsxm2w2J34AacAzsUwzem6kmsYcKs9CDQ9wIJBRw9FDaKkbV64waI1FdEI7ZALkZCKZBEWUFeA
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
bot.db
|
||||
.env
|
||||
data/saas_bot.db
|
||||
11
Dockerfile
11
Dockerfile
@@ -1,21 +1,13 @@
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
# Ensure CGO is off for a static binary
|
||||
ENV CGO_ENABLED=0
|
||||
# Ensure Go modules are strictly enforced
|
||||
ENV GO111MODULE=on
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only the dependency files first
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy the entire project structure
|
||||
COPY . .
|
||||
|
||||
# Build from the current directory (.) so it finds the module root
|
||||
RUN go build -o /app/bot .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o bot .
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
@@ -26,6 +18,7 @@ WORKDIR /root/
|
||||
|
||||
COPY --from=builder /app/bot .
|
||||
COPY --from=builder /app/templates ./templates
|
||||
COPY --from=builder /app/static ./static
|
||||
COPY .env .
|
||||
|
||||
ENV DB_PATH=/data/bot.db
|
||||
|
||||
BIN
__debug_bin.exe
BIN
__debug_bin.exe
Binary file not shown.
2
data/.gitignore
vendored
Normal file
2
data/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
6
db/db.go
6
db/db.go
@@ -11,11 +11,7 @@ var Conn *sql.DB
|
||||
|
||||
func Init() {
|
||||
var err error
|
||||
<<<<<<< HEAD
|
||||
Conn, err = sql.Open("sqlite", "./saas_bot.db")
|
||||
=======
|
||||
Conn, err = sql.Open("sqlite", "./data/bot.db")
|
||||
>>>>>>> 63654c4c1b55ddcfeb4a5adf43d0a1778236c58d
|
||||
Conn, err = sql.Open("sqlite", "./data/saas_bot.db")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
BIN
saas_bot.db
BIN
saas_bot.db
Binary file not shown.
Reference in New Issue
Block a user