chore: Fixing dockerfile

This commit is contained in:
Siwoo Jeon 2025-04-12 16:04:51 +09:00
parent e3e4b372d0
commit e7b653eaa7
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA
4 changed files with 13 additions and 15 deletions

10
.dockerignore Normal file
View file

@ -0,0 +1,10 @@
.git/
.vscode/
.env*
.gitignore
.dockerignore
README.md
update.sh
compose.yml
Dockerfile
script/

View file

@ -3,15 +3,7 @@ FROM golang:1.24.1
RUN mkdir /app
WORKDIR /app
COPY ./commands .
COPY ./configs .
COPY ./databases .
COPY ./handler .
COPY ./utils .
COPY ./components .
COPY go.mod .
COPY go.sum .
COPY main.go .
COPY . .
RUN go build -o build/goMuffin git.wh64.net/muffin/goMuffin

View file

@ -27,11 +27,7 @@ type MuffinConfig struct {
}
func loadConfig() *MuffinConfig {
err := godotenv.Load()
if err != nil {
log.Println("[goMuffin] 봇의 설절파일을 불러올 수가 없어요.")
log.Fatalln(err)
}
godotenv.Load()
config := &MuffinConfig{Bot: botConfig{}, Train: trainConfig{}}
setConfig(config)

View file

@ -1,4 +1,4 @@
#!/usr/bin/sh
#!/bin/sh
sudo docker compose stop
sudo docker compose rm -s -f
sudo docker compose build