From 709805d72287e0d62ad407793058b2196ed60b5e Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Thu, 7 Jul 2022 15:58:04 +0200 Subject: [PATCH] More docker and deploy updates --- Dockerfile | 1 + config/config.go | 2 +- deploy | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4f06b3a..ba1101e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ COPY . . RUN go build -buildvcs=false -o storage-server -v . FROM alpine:latest AS runner +RUN apk add mdadm WORKDIR /app COPY --from=frontend-builder /frontend/dist ./_frontend/dist COPY ./scripts ./scripts diff --git a/config/config.go b/config/config.go index 1b93d8f..c59ae30 100644 --- a/config/config.go +++ b/config/config.go @@ -54,7 +54,7 @@ func init() { Mode = loadEnv("MODE", "development") Host = loadEnv("HOST", ":4000") - BaseURL = loadEnv("HOST", "http://localhost:4000") + BaseURL = loadEnv("BASE_URL", "http://localhost:4000") AdminPassword = loadEnv("ADMIN_PASSWORD", "secret") diff --git a/deploy b/deploy index 9016e81..e0d3d91 100755 --- a/deploy +++ b/deploy @@ -19,6 +19,8 @@ docker run -d \ --name "$CONTAINER_NAME" \ --restart unless-stopped \ -p "$HOST_PORT:4000" \ + -v /proc:/proc \ + -v /dev:/dev \ -v "$(pwd)/buckets.local:/buckets" \ -v "$(pwd)/database.local.json:/app/database.local.json" \ "$IMAGE_NAME"