diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-13 02:07:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-07-13 02:07:05 +0900 |
| commit | 463f0414fcedff732cfdc38d369c394b8a05be7a (patch) | |
| tree | 8ebd56d557258e85e89ccc9aafb668a8f9d9f167 | |
| parent | 3754f11c33a6b4ac756a0d89426764fd9032cf53 (diff) | |
| download | feedaka-463f0414fcedff732cfdc38d369c394b8a05be7a.tar.gz feedaka-463f0414fcedff732cfdc38d369c394b8a05be7a.tar.zst feedaka-463f0414fcedff732cfdc38d369c394b8a05be7a.zip | |
feat(backend): change db file path
| -rw-r--r-- | Dockerfile | 1 | ||||
| -rw-r--r-- | backend/main.go | 2 | ||||
| -rw-r--r-- | compose.yaml | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -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: |
