mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* fn: docker compose fixups
1) FN_DOCKER_NETWORKS for fnserver to place the functions in
2) mysql should be in sync with test.sh/api_test.sh mysql version to avoid errors such as
msg="couldn't ping db" error="this authentication plugin is not supported" url="root:root@tcp(db:3306)/funcs
TODO: fix/investigate why fnserver fails on latest mysql.
* fn: docker-compose network should be explicit
99 lines
1.9 KiB
YAML
99 lines
1.9 KiB
YAML
version: '3'
|
|
networks:
|
|
fn-network:
|
|
name: fn-network
|
|
services:
|
|
logstore:
|
|
hostname: logstore
|
|
image: minio/minio
|
|
networks:
|
|
- fn-network
|
|
ports:
|
|
- "9091:9000"
|
|
environment:
|
|
- MINIO_ACCESS_KEY=admin
|
|
- MINIO_SECRET_KEY=password
|
|
volumes:
|
|
- ./data/logstore:/data
|
|
command: server /data
|
|
db:
|
|
image: "mysql:5.7.22"
|
|
restart: always
|
|
networks:
|
|
- fn-network
|
|
ports:
|
|
- "3306:3306"
|
|
environment:
|
|
- "MYSQL_DATABASE=funcs"
|
|
- "MYSQL_ROOT_PASSWORD=root"
|
|
volumes:
|
|
- ./data/mysql:/var/lib/mysql
|
|
mq:
|
|
image: "redis"
|
|
restart: always
|
|
networks:
|
|
- fn-network
|
|
ports:
|
|
- "6379:6379"
|
|
fnserver:
|
|
restart: always
|
|
depends_on:
|
|
- mq
|
|
- db
|
|
- logstore
|
|
build: .
|
|
networks:
|
|
- fn-network
|
|
ports:
|
|
- "8080:8080"
|
|
links:
|
|
- "db"
|
|
- "mq"
|
|
- "logstore"
|
|
environment:
|
|
FN_DB_URL: "mysql://root:root@tcp(db:3306)/funcs"
|
|
FN_MQ_URL: "redis://mq:6379/"
|
|
FN_LOGSTORE_URL: "s3://admin:password@logstore:9000/us-east-1/fnlogs"
|
|
FN_DOCKER_NETWORKS: "fn-network"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
grafana:
|
|
image: grafana/grafana
|
|
restart: always
|
|
networks:
|
|
- fn-network
|
|
ports:
|
|
- "3000:3000"
|
|
links:
|
|
- fnserver
|
|
- prometheus
|
|
depends_on:
|
|
- fnserver
|
|
- prometheus
|
|
prometheus:
|
|
image: prom/prometheus
|
|
restart: always
|
|
depends_on:
|
|
- fnserver
|
|
networks:
|
|
- fn-network
|
|
ports:
|
|
- "9090:9090"
|
|
links:
|
|
- fnserver
|
|
volumes:
|
|
- ./examples/grafana/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
fnserver-ui:
|
|
depends_on:
|
|
- fnserver
|
|
image: fnproject/ui
|
|
restart: always
|
|
networks:
|
|
- fn-network
|
|
ports:
|
|
- "4000:4000"
|
|
links:
|
|
- "fnserver"
|
|
environment:
|
|
- FN_API_URL=http://fnserver:8080
|