mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 20:16:37 +00:00
Lock down faas-swarm
- This commit moves us to faas-swarm 0.4.2 which uses basic auth (when enabled) to prevent functions or other services from accessing the administrative API endpoints. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
@ -35,11 +35,9 @@ services:
|
|||||||
|
|
||||||
# Docker Swarm provider
|
# Docker Swarm provider
|
||||||
faas-swarm:
|
faas-swarm:
|
||||||
image: openfaas/faas-swarm:0.4.1-armhf
|
image: openfaas/faas-swarm:0.4.2-armhf
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
# ports:
|
|
||||||
# - 8081:8080
|
|
||||||
networks:
|
networks:
|
||||||
- functions
|
- functions
|
||||||
environment:
|
environment:
|
||||||
|
@ -41,15 +41,15 @@ services:
|
|||||||
faas-swarm:
|
faas-swarm:
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
# ports:
|
image: openfaas/faas-swarm:0.4.2
|
||||||
# - 8081:8080
|
|
||||||
image: openfaas/faas-swarm:0.4.1
|
|
||||||
networks:
|
networks:
|
||||||
- functions
|
- functions
|
||||||
environment:
|
environment:
|
||||||
read_timeout: "300s" # set both here, and on your functions
|
read_timeout: "300s" # set both here, and on your functions
|
||||||
write_timeout: "300s" # set both here, and on your functions
|
write_timeout: "300s" # set both here, and on your functions
|
||||||
DOCKER_API_VERSION: "1.30"
|
DOCKER_API_VERSION: "1.30"
|
||||||
|
basic_auth: "${BASIC_AUTH:-true}"
|
||||||
|
secret_mount_path: "/run/secrets/"
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
@ -65,6 +65,9 @@ services:
|
|||||||
delay: 5s
|
delay: 5s
|
||||||
max_attempts: 20
|
max_attempts: 20
|
||||||
window: 380s
|
window: 380s
|
||||||
|
secrets:
|
||||||
|
- basic-auth-user
|
||||||
|
- basic-auth-password
|
||||||
|
|
||||||
nats:
|
nats:
|
||||||
image: nats-streaming:0.6.0
|
image: nats-streaming:0.6.0
|
||||||
|
Reference in New Issue
Block a user