From 2ed41d5dd569f3d4ac2f3639fbf364d2c5332746 Mon Sep 17 00:00:00 2001 From: Jared Furlow Date: Sat, 10 May 2025 20:07:14 -0500 Subject: [PATCH] Test --- Dockerfile | 7 +++++++ docker-compose.yaml | 18 ++++++++++++++++++ garage.toml | 22 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml create mode 100644 garage.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e2d162c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM dxflrs/garage:v1.1.0 + +WORKDIR /opt/prod/app +COPY . . + +RUN 'envsubst "$(env)" < garage.toml > garage-env-added.toml' +RUN cp garage-env-added.toml /etc/garage.toml \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..53e11d8 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,18 @@ +services: + bore-tunnel: + restart: unless-stopped + build: + context: . + dockerfile: ./Dockerfile + environment: + - 'GARAGE_RPC_SECRET=${GARAGE_RPC_SECRET}' + volumes: + - /mnt/Samsung1TB/garage-fs/meta:/opt/prod/garage-fs/meta + - /mnt/Samsung1TB/garage-fs/data:/opt/prod/garage-fs/data + healthcheck: + test: ["CMD", "nc", "-z", "127.0.0.1", "3900"] + interval: 5s + start_period: 30s + start_interval: 1s + timeout: 10s + retries: 15 \ No newline at end of file diff --git a/garage.toml b/garage.toml new file mode 100644 index 0000000..343b012 --- /dev/null +++ b/garage.toml @@ -0,0 +1,22 @@ +metadata_dir = "/opt/prod/garage-fs/meta" +data_dir = "/opt/prod/garage-fs/data" +db_engine = "lmdb" +metadata_auto_snapshot_interval = "6h" + +replication_factor = 3 + +compression_level = 2 + +rpc_bind_addr = "[::]:3901" +rpc_public_addr = "127.0.0.1:3901" +rpc_secret = "${GARAGE_RPC_SECRET}" + +[s3_api] +s3_region = "garage" +api_bind_addr = "[::]:3900" +root_domain = "garage-ikea.jdf2.org" + +[s3_web] +bind_addr = "[::]:3902" +root_domain = "garage-ikea.jdf2.org" +index = "index.html" \ No newline at end of file