rename env variables
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
|||||||
|
FROM golang:1.21.0
|
||||||
|
|
||||||
|
# Creates an app directory to hold your app’s source code
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copies everything from your root directory into /app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Installs Go dependencies
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
# Builds your app with optional configuration
|
||||||
|
RUN go build
|
||||||
|
|
||||||
|
# Tells Docker which network port your container listens on
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
# Specifies the executable command that runs when the container starts
|
||||||
|
CMD [ “/hal” ]
|
||||||
|
|
||||||
Vendored
+4
-4
@@ -17,10 +17,10 @@ func GetEnvVariables() Env {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Env{
|
return Env{
|
||||||
AppID: tempest.StringToSnowflake(os.Getenv("APP_ID")),
|
AppID: tempest.StringToSnowflake(os.Getenv("HAL_APP_ID")),
|
||||||
PublicKey: os.Getenv("PUBLIC_KEY"),
|
PublicKey: os.Getenv("HAL_PUBLIC_KEY"),
|
||||||
Token: os.Getenv("TOKEN"),
|
Token: os.Getenv("HAL_TOKEN"),
|
||||||
Port: "8080",
|
Port: os.Getenv("PORT"),
|
||||||
Addr: os.Getenv("ADDR"),
|
Addr: os.Getenv("ADDR"),
|
||||||
ServerIDs: serverIDs,
|
ServerIDs: serverIDs,
|
||||||
OpenaiHalToken: os.Getenv("OPENAI_HAL"),
|
OpenaiHalToken: os.Getenv("OPENAI_HAL"),
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ func main() {
|
|||||||
if err := client.ListenAndServe(addr); err != nil {
|
if err := client.ListenAndServe(addr); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func initialize(c tempest.Client, serverIDs []tempest.Snowflake) error {
|
func initialize(c tempest.Client, serverIDs []tempest.Snowflake) error {
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
resty "github.com/go-resty/resty/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user