aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-13 02:07:05 +0900
committernsfisis <nsfisis@gmail.com>2025-07-13 02:07:05 +0900
commit463f0414fcedff732cfdc38d369c394b8a05be7a (patch)
tree8ebd56d557258e85e89ccc9aafb668a8f9d9f167
parent3754f11c33a6b4ac756a0d89426764fd9032cf53 (diff)
downloadfeedaka-463f0414fcedff732cfdc38d369c394b8a05be7a.tar.gz
feedaka-463f0414fcedff732cfdc38d369c394b8a05be7a.tar.zst
feedaka-463f0414fcedff732cfdc38d369c394b8a05be7a.zip
feat(backend): change db file path
-rw-r--r--Dockerfile1
-rw-r--r--backend/main.go2
-rw-r--r--compose.yaml2
3 files changed, 3 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index c73319b..64cc431 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -29,6 +29,7 @@ FROM alpine
WORKDIR /app
COPY --from=backend-builder /app/feedaka /app
+RUN mkdir -p /app/data
EXPOSE 8080
CMD ["/app/feedaka"]
diff --git a/backend/main.go b/backend/main.go
index ecfcbae..3bbe2f7 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -154,7 +154,7 @@ func main() {
}
var err error
- database, err = sql.Open("sqlite3", "feedaka.db")
+ database, err = sql.Open("sqlite3", "data/feedaka.db")
if err != nil {
log.Fatal(err)
}
diff --git a/compose.yaml b/compose.yaml
index 69dad6f..1a40ecc 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -3,7 +3,7 @@ services:
build:
context: .
volumes:
- - ./data/feedaka.db:/app/feedaka.db
+ - ./data/feedaka.db:/app/data/feedaka.db
ports:
- '127.0.0.1:8002:8080'
environment: