mirror of
https://github.com/openfaas/faas.git
synced 2025-06-10 09:16:48 +00:00
- Extend stack to include a test function
- Allow _ char in routes - Let Dockerfile shrink by coming from alpine
This commit is contained in:
parent
fe9ada50bd
commit
ea488cf742
@ -4,10 +4,11 @@ services:
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
ports:
|
||||
- 3000:8080
|
||||
image: alexellisio/faas-gateway:latest
|
||||
- 8080:8080
|
||||
image: alexellis2/faas-gateway:latest
|
||||
networks:
|
||||
- functions
|
||||
|
||||
prometheus:
|
||||
image: quay.io/prometheus/prometheus:latest
|
||||
volumes:
|
||||
@ -21,7 +22,20 @@ services:
|
||||
no_proxy: "gateway"
|
||||
networks:
|
||||
- functions
|
||||
|
||||
# Sample functions go here.
|
||||
hubstats:
|
||||
image: alexellis2/faas-dockerhubstats:latest
|
||||
depends_on:
|
||||
- gateway
|
||||
networks:
|
||||
- functions
|
||||
environment:
|
||||
no_proxy: "gateway"
|
||||
https_proxy: $https_proxy
|
||||
|
||||
networks:
|
||||
functions:
|
||||
driver: overlay
|
||||
# Docker does not support this option yet - maybe create outside of the stack and reference as "external"?
|
||||
#attachable: true
|
||||
|
@ -1,4 +1,3 @@
|
||||
FROM golang:1.7.3
|
||||
FROM alpine:latest
|
||||
|
||||
COPY gateway .
|
||||
|
@ -185,7 +185,7 @@ func main() {
|
||||
r := mux.NewRouter()
|
||||
r.HandleFunc("/", makeProxy(metricsOptions, false))
|
||||
|
||||
r.HandleFunc("/function/{name:[a-zA-Z]+}", makeProxy(metricsOptions, true))
|
||||
r.HandleFunc("/function/{name:[a-zA-Z_]+}", makeProxy(metricsOptions, true))
|
||||
|
||||
metricsHandler := metrics.PrometheusHandler()
|
||||
r.Handle("/metrics", metricsHandler)
|
||||
|
Loading…
x
Reference in New Issue
Block a user