From 27e386fb35d36fbe397d4aa2a1ea14b1c99f3528 Mon Sep 17 00:00:00 2001 From: blek Date: Sat, 11 Nov 2023 17:34:21 +1000 Subject: [PATCH] deploy resourceD within dev compose file --- conf/caddy/Caddyfile | 4 ++++ containers/go-dev.Dockerfile | 10 ++++++++++ docker-compose.dev.yml | 9 +++++++++ 3 files changed, 23 insertions(+) create mode 100644 containers/go-dev.Dockerfile diff --git a/conf/caddy/Caddyfile b/conf/caddy/Caddyfile index e52811c..8984b7a 100644 --- a/conf/caddy/Caddyfile +++ b/conf/caddy/Caddyfile @@ -4,4 +4,8 @@ uri * strip_prefix /qr reverse_proxy http://qr } + handle /resource/* { + uri * strip_prefix /resource + reverse_proxy http://resourced + } } \ No newline at end of file diff --git a/containers/go-dev.Dockerfile b/containers/go-dev.Dockerfile new file mode 100644 index 0000000..c78435d --- /dev/null +++ b/containers/go-dev.Dockerfile @@ -0,0 +1,10 @@ +FROM golang:alpine + +RUN go install github.com/cosmtrek/air@latest + +WORKDIR /opt/code + +# The directory will be mounted +# COPY . . + +CMD [ "air", "-c", ".air.toml" ] diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 774aea5..f3d3871 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -21,6 +21,15 @@ services: volumes: - './janitor:/opt/code' - './volatile/files:/opt/user_uploads' + resourced: + build: + context: containers + dockerfile: go-dev.Dockerfile + networks: + bfile: + volumes: + - './resource:/opt/code' + - '/opt/code/tmp' caddy: image: caddy:alpine volumes: