From e2bc2043d0f1f6b42d511b04144fb0969dedfb2c Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Wed, 3 Apr 2019 08:52:00 +0200 Subject: [PATCH] update Dockerfile add default config for local testing --- Dockerfile | 8 +++---- examples/config.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 examples/config.yml diff --git a/Dockerfile b/Dockerfile index 2510b8d..1d973e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,6 @@ COPY . . COPY --from=agola-web /agola-web/dist/ /agola-web/dist/ RUN make WEBBUNDLE=1 WEBDISTPATH=/agola-web/dist -#RUN go build -tags "sqlite_unlock_notify webbundle" -o /go/bin/agola ./cmd/agola -#RUN CGO_ENABLED=0 go build -tags "sqlite_unlock_notify webbundle" -o /go/bin/agola-toolbox ./cmd/toolbox ####### @@ -35,8 +33,10 @@ RUN make WEBBUNDLE=1 WEBDISTPATH=/agola-web/dist ####### FROM debian:stable -WORKDIR /go/src/github.com/sorintlab/agola +WORKDIR / # Finally we copy the statically compiled Go binary. COPY --from=server_builder /agola/bin/agola /agola/bin/agola-toolbox /bin/ -ENTRYPOINT ["/bin/agola"] \ No newline at end of file +COPY examples/config.yml . + +ENTRYPOINT ["/bin/agola"] diff --git a/examples/config.yml b/examples/config.yml new file mode 100644 index 0000000..a9ae6cc --- /dev/null +++ b/examples/config.yml @@ -0,0 +1,54 @@ +gateway: + apiExposedURL: "http://172.17.0.1:8000" + webExposedURL: "http://172.17.0.1:8080" + runServiceURL: "http://localhost:4000" + configStoreURL: "http://localhost:4002" + web: + listenAddress: ":8000" + tokenSigning: + # hmac or rsa (it possible use rsa) + method: hmac + # key to use when signing with hmac + key: supersecretsigningkey + # paths to the private and public keys in pem encoding when using rsa signing + #privateKeyPath: /path/to/privatekey.pem + #publicKeyPath: /path/to/public.pem + adminToken: "admintoken" + +scheduler: + runServiceURL: "http://localhost:4000" + +configStore: + dataDir: /tmp/agola/configstore + etcd: + endpoints: "http://localhost:2379" + lts: + type: posix + path: /tmp/agola/configstore/lts + web: + listenAddress: ":4002" + +runServiceScheduler: + #debug: true + dataDir: /tmp/agola/runservice/scheduler + lts: + type: posix + path: /tmp/agola/runservice/lts + etcd: + endpoints: "http://localhost:2379" + web: + listenAddress: ":4000" + +runServiceExecutor: + dataDir: /tmp/agola/runservice/executor + toolboxPath: ./bin/agola-toolbox + runServiceURL: "http://localhost:4000" + web: + listenAddress: ":4001" + +gitServer: + dataDir: /tmp/agola/gitserver + githookPath: ./bin/agola-git-hook + gatewayURL: "http://localhost:8000" + web: + listenAddress: ":4003" \ No newline at end of file