update Dockerfile

add default config for local testing
This commit is contained in:
Simone Gotti 2019-04-03 08:52:00 +02:00
parent 7bf2c106e4
commit e2bc2043d0
2 changed files with 58 additions and 4 deletions

View File

@ -26,8 +26,6 @@ COPY . .
COPY --from=agola-web /agola-web/dist/ /agola-web/dist/ COPY --from=agola-web /agola-web/dist/ /agola-web/dist/
RUN make WEBBUNDLE=1 WEBDISTPATH=/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 FROM debian:stable
WORKDIR /go/src/github.com/sorintlab/agola WORKDIR /
# Finally we copy the statically compiled Go binary. # Finally we copy the statically compiled Go binary.
COPY --from=server_builder /agola/bin/agola /agola/bin/agola-toolbox /bin/ COPY --from=server_builder /agola/bin/agola /agola/bin/agola-toolbox /bin/
ENTRYPOINT ["/bin/agola"] COPY examples/config.yml .
ENTRYPOINT ["/bin/agola"]

54
examples/config.yml Normal file
View File

@ -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"