diff options
| -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: |
