From d900baddabd3fdfd2648cda852034b9c3f09ac7d Mon Sep 17 00:00:00 2001 From: Evan Yang Date: Wed, 27 Sep 2023 10:20:56 -0700 Subject: [PATCH] feat: olumes for docker deployment to make editing config files easier --- Dockerfile | 4 +--- docker-compose.yml | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f779730..c1bdd63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,6 @@ RUN cargo install --path . # We do not need the Rust toolchain to run the binary! FROM gcr.io/distroless/cc-debian12 COPY --from=builder /app/public/ /opt/websurfx/public/ -COPY --from=builder /app/websurfx/config.lua /etc/xdg/websurfx/config.lua -COPY --from=builder /app/websurfx/allowlist.txt /etc/xdg/websurfx/allowlist.txt -COPY --from=builder /app/websurfx/blocklist.txt /etc/xdg/websurfx/blocklist.txt +VOLUME ["/etc/xdg/websurfx/"] COPY --from=builder /usr/local/cargo/bin/* /usr/local/bin/ CMD ["websurfx"] diff --git a/docker-compose.yml b/docker-compose.yml index aed741e..5cf7383 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,9 @@ services: - redis links: - redis + volumes: + - ./websurfx/:/etc/xdg/websurfx/ + - ./public/:/opt/websurfx/public/ redis: image: redis:latest ports: