File tree Expand file tree Collapse file tree 5 files changed +30
-1
lines changed Expand file tree Collapse file tree 5 files changed +30
-1
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "openaisession" : " YOUR_COOKIE_HERE"
3
+ }
Original file line number Diff line number Diff line change
1
+ FROM golang:1-alpine as builder
2
+ RUN apk update && apk add gcc make g++ git
3
+ WORKDIR /build
4
+ ADD . .
5
+ RUN make build
6
+
7
+ FROM alpine
8
+ COPY --from=builder /build/chatgpt-telegram /bin/chatgpt-telegram
9
+ RUN chmod +x /bin/chatgpt-telegram
10
+
11
+ ENTRYPOINT ["/bin/chatgpt-telegram" ]
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ You will then have to create a config file in the following location depending o
36
36
37
37
Finally, add your cookie to the file and save it. It should look like this: ` { "openaisession": "YOUR_COOKIE_HERE" } ` .
38
38
39
+ ## Docker
40
+
41
+ It is also possible to launch the bot via the docker image included.
42
+
43
+ Check [ docker-compose] ( ./docker-compose.yml ) file to understands how to do it.
44
+
39
45
## License
40
46
41
47
This repository is licensed under the [ MIT License] ( LICENSE ) .
Original file line number Diff line number Diff line change
1
+ services :
2
+ chatgpt-telegram :
3
+ build : .
4
+ container_name : chatgpt-telegram
5
+ volumes :
6
+ - .config/:/root/.config
7
+ environment :
8
+ - TELEGRAM_ID=
9
+ - TELEGRAM_TOKEN=
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ func main() {
46
46
47
47
err = godotenv .Load ()
48
48
if err != nil {
49
- log .Fatalf ("Couldn't load .env file: %v" , err )
49
+ log .Printf ("Couldn't load .env file: %v. Using shell exposed env variables... " , err )
50
50
}
51
51
52
52
bot , err := tgbotapi .NewBotAPI (os .Getenv ("TELEGRAM_TOKEN" ))
You can’t perform that action at this time.
0 commit comments