diff options
-rwxr-xr-x | .rr.yaml | 21 | ||||
-rw-r--r-- | Dockerfile | 53 | ||||
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 20 | ||||
-rw-r--r-- | plugins/server/plugin.go | 4 |
5 files changed, 29 insertions, 71 deletions
@@ -45,11 +45,26 @@ logs: # Workflow and activity mesh service temporal: - address: localhost:7233 activities: num_workers: 4 - codec: proto - debug_level: 2 + # default 0 - no limit + max_jobs: 0 + # default 1 minute + allocate_timeout: 60s + # default 1 minute + destroy_timeout: 60s + # supervisor used to control http workers + supervisor: + # watch_tick defines how often to check the state of the workers (seconds) + watch_tick: 1s + # ttl defines maximum time worker is allowed to live (seconds) + ttl: 0 + # idle_ttl defines maximum duration worker can spend in idle mode after first use. Disabled when 0 (seconds) + idle_ttl: 0 + # exec_ttl defines maximum lifetime per job (seconds) + exec_ttl: 0 + # max_worker_memory limits memory usage per worker (MB) + max_worker_memory: 100 http: # host and port separated by semicolon diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 5291e86b..00000000 --- a/Dockerfile +++ /dev/null @@ -1,53 +0,0 @@ -# Image page: <https://hub.docker.com/_/golang> -FROM golang:1.15.6 as builder - -# app version and build date must be passed during image building (version without any prefix). -# e.g.: `docker build --build-arg "APP_VERSION=1.2.3" --build-arg "BUILD_TIME=$(date +%FT%T%z)" .` -ARG APP_VERSION="undefined" -ARG BUILD_TIME="undefined" - -# arguments to pass on each go tool link invocation -ENV LDFLAGS="-s \ --X github.com/spiral/roadrunner/cmd/rr/cmd.Version=$APP_VERSION \ --X github.com/spiral/roadrunner/cmd/rr/cmd.BuildTime=$BUILD_TIME" - -RUN mkdir /src - -WORKDIR /src - -COPY ./go.mod ./go.sum ./ - -# Burn modules cache -RUN set -x \ - && go version \ - && go mod download \ - && go mod verify - -COPY . . - -# compile binary file -RUN CGO_ENABLED=0 go build -trimpath -ldflags "$LDFLAGS" -o ./rr ./cmd/main.go - -# Image page: <https://hub.docker.com/_/alpine> -FROM alpine:3.13 - -# use same build arguments for image labels -ARG APP_VERSION -ARG BUILD_TIME - -LABEL \ - org.opencontainers.image.title="roadrunner" \ - org.opencontainers.image.description="High-performance PHP application server, load-balancer and process manager" \ - org.opencontainers.image.url="https://github.com/spiral/roadrunner" \ - org.opencontainers.image.source="https://github.com/spiral/roadrunner" \ - org.opencontainers.image.vendor="SpiralScout" \ - org.opencontainers.image.version="$APP_VERSION" \ - org.opencontainers.image.created="$BUILD_TIME" \ - org.opencontainers.image.licenses="MIT" - -# copy required files from builder image -COPY --from=builder /src/rr /usr/bin/rr -COPY --from=builder /src/.rr.yaml /etc/rr.yaml - -# use roadrunner binary as image entrypoint -ENTRYPOINT ["/usr/bin/rr"] @@ -10,7 +10,7 @@ require ( github.com/dustin/go-humanize v1.0.0 github.com/fatih/color v1.10.0 github.com/go-ole/go-ole v1.2.5 // indirect - github.com/go-redis/redis/v8 v8.6.0 + github.com/go-redis/redis/v8 v8.7.1 github.com/gofiber/fiber/v2 v2.5.0 github.com/golang/mock v1.4.4 github.com/hashicorp/go-multierror v1.1.0 @@ -114,8 +114,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-redis/redis/v8 v8.6.0 h1:swqbqOrxaPztsj2Hf1p94M3YAgl7hYEpcw21z299hh8= -github.com/go-redis/redis/v8 v8.6.0/go.mod h1:DQ9q4Rk2HtwkrwVrdgmphoOQDMfpvcd/nHEwRsicg8s= +github.com/go-redis/redis/v8 v8.7.1 h1:8IYi6RO83fNcG5amcUUYTN/qH2h4OjZHlim3KWGFSsA= +github.com/go-redis/redis/v8 v8.7.1/go.mod h1:BRxHBWn3pO3CfjyX6vAoyeRmCquvxr6QG+2onGV2gYs= github.com/go-restit/lzjson v0.0.0-20161206095556-efe3c53acc68/go.mod h1:7vXSKQt83WmbPeyVjCfNT9YDJ5BUFmcwFsEjI9SCvYM= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -433,14 +433,14 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v0.17.0 h1:6MKOu8WY4hmfpQ4oQn34u6rYhnf2sWf1LXYO/UFm71U= -go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s= -go.opentelemetry.io/otel/metric v0.17.0 h1:t+5EioN8YFXQ2EH+1j6FHCKMUj+57zIDSnSGr/mWuug= -go.opentelemetry.io/otel/metric v0.17.0/go.mod h1:hUz9lH1rNXyEwWAhIWCMFWKhYtpASgSnObJFnU26dJ0= -go.opentelemetry.io/otel/oteltest v0.17.0 h1:TyAihUowTDLqb4+m5ePAsR71xPJaTBJl4KDArIdi9k4= -go.opentelemetry.io/otel/oteltest v0.17.0/go.mod h1:JT/LGFxPwpN+nlsTiinSYjdIx3hZIGqHCpChcIZmdoE= -go.opentelemetry.io/otel/trace v0.17.0 h1:SBOj64/GAOyWzs5F680yW1ITIfJkm6cJWL2YAvuL9xY= -go.opentelemetry.io/otel/trace v0.17.0/go.mod h1:bIujpqg6ZL6xUTubIUgziI1jSaUPthmabA/ygf/6Cfg= +go.opentelemetry.io/otel v0.18.0 h1:d5Of7+Zw4ANFOJB+TIn2K3QWsgS2Ht7OU9DqZHI6qu8= +go.opentelemetry.io/otel v0.18.0/go.mod h1:PT5zQj4lTsR1YeARt8YNKcFb88/c2IKoSABK9mX0r78= +go.opentelemetry.io/otel/metric v0.18.0 h1:yuZCmY9e1ZTaMlZXLrrbAPmYW6tW1A5ozOZeOYGaTaY= +go.opentelemetry.io/otel/metric v0.18.0/go.mod h1:kEH2QtzAyBy3xDVQfGZKIcok4ZZFvd5xyKPfPcuK6pE= +go.opentelemetry.io/otel/oteltest v0.18.0 h1:FbKDFm/LnQDOHuGjED+fy3s5YMVg0z019GJ9Er66hYo= +go.opentelemetry.io/otel/oteltest v0.18.0/go.mod h1:NyierCU3/G8DLTva7KRzGii2fdxdR89zXKH1bNWY7Bo= +go.opentelemetry.io/otel/trace v0.18.0 h1:ilCfc/fptVKaDMK1vWk0elxpolurJbEgey9J6g6s+wk= +go.opentelemetry.io/otel/trace v0.18.0/go.mod h1:FzdUu3BPwZSZebfQ1vl5/tAa8LyMLXSJN57AXIt/iDk= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 95e593b8..f708b15e 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -90,10 +90,6 @@ func (server *Plugin) CmdFactory(env Env) (func() *exec.Cmd, error) { return nil, errors.E(op, errors.Str("minimum command should be `<executable> <script>")) } - _, err := os.Stat(cmdArgs[1]) - if err != nil { - return nil, errors.E(op, err) - } return func() *exec.Cmd { cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) //nolint:gosec utils.IsolateProcess(cmd) |