Commit ace8cb51 by chalermpong

commit

parents
#####################################################################################
#
# env - structure rev.3
#
# XXX_STACK_ENDPOINT ---> docker network internal service endpoint e.g. http://flowengine:41080
# XXX_PUBLIC_ENDPOINT ---> external service endpoint e.g. https://flowstack.nexiiot.io
# XXX_ENDPOINT ---> address with protocol e.g. tcp://redis:6379
# XXX_HOST ---> address without protocol e.g. redis:6379
#
#####################################################################################
#### VM config ####
FLOWSTACK_WWW_PUBLIC_URL=https://swarovski.flowstack.nexiiot.io
SCADA_PUBLIC_URL=https://scada-swarovski.flowstack.nexiiot.io/
GRAFANA_PUBLIC_URL=https://grafana-swarovski.flowstack.nexiiot.io/
POSTGRES_PASSWORD=2NQ4UXAsqpscs1S4gjbra9jc
MONGODB_PASSWORD=vBhWiajWwatVpbG51AYqA843
INFLUXDB_ADMIN_PASSWORD=5OfyzFmTyc1zF7Xp5VFiehXp
INFLUXDB_ADMIN_TOKEN=6uAM8YHLX8fMnyDZemhVnvgT
NPM_INIT_PASSWORD=WpdaIDsikTjlU5my0vE2iaLq
CLOUDBEAVER_ADMIN_PASSWORD=15HAuEyGucAgl9F7JKjvErVp
FLOWSTACK_ADMINISTRATOR_PASSWORD=t8woer8hxuZ73wyzQ6bkDCRl
FLOWSTACK_NANOMQ_PASSWORD=Ax7PFlQT3eA9lvViiBhwmwne
GRAFANA_SECURITY_ADMIN_PASSWORD=zeB1qcBjIY92st576eXGRqX5
###################
FLOWSTACK_NAME=flowstack
FLOWSTACK_VOLUME_HOST_PATH=/usr/local/${FLOWSTACK_NAME}-volume
WORKSPACE_HOST_PATH=${FLOWSTACK_VOLUME_HOST_PATH}/${FLOWSTACK_NAME}_workspace
FLOWSTACK_ADMINISTRATOR_PASSWORD=${FLOWSTACK_ADMINISTRATOR_PASSWORD}
FLOWSTACK_WWW_STACK_URL=http://flowstack
FLOWSTACK_PUBLIC_PORT=40000
FLOWSTACK_PASSWORD_LOGIN=true
FLOWSTACK_OAUTH_LOGIN=true
FLOWSTACK_AUTH_PLATFORM_NAME=NEXIIOT
FLOWSTACK_OAUTH_CLIENT_ID=b251a594295613c43543b1484aae2082
FLOWSTACK_OAUTH_CLIENT_SECRET=508dc83ac016e803b56ecfd9edd0f93803f82ac12c947aa05da48fea21885f2f
FLOWSTACK_AUTH_ENDPOINT=https://auth.nexiiot.io/dialog/authorize
FLOWSTACK_TOKEN_ENDPOINT=https://auth.nexiiot.io/oauth/token
FLOWSTACK_USERINFO_API_ENDPOINT=https://auth.nexiiot.io/api/userinfo
FLOWSTACK_GQLV2_ENDPOINT=https://gqlv2.nexiiot.io
FLOWSTACK_LOCAL_OAUTH_CLIENT_ID=8b72a888-5210-4984-b7f5-90559b3dece9
FLOWSTACK_LOCAL_OAUTH_CLIENT_SECRET=f4c4013102f57a50d875a15be7314229
FLOWSTACK_LOCAL_OAUTH_AUTH_ENDPOINT=${FLOWSTACK_WWW_PUBLIC_URL}/dialog/authorize
FLOWSTACK_LOCAL_OAUTH_TOKEN_ENDPOINT=${FLOWSTACK_WWW_STACK_URL}/oauth/token
FLOWSTACK_LOCAL_USERINFO_API_ENDPOINT=${FLOWSTACK_WWW_STACK_URL}/api/userinfo
FLOWENGINE_ENDPOINT=http://flowengine:80
JUPYTERGATEWAY_STACK_ENDPOINT=jupyter-gateway:10100
JUPYTERNOTEBOOK_STACK_ENDPOINT=http://jupyter-notebook:8888
SCADA_PUBLIC_URL=${SCADA_PUBLIC_URL}
SCADA_PUBLIC_PORT=41881
POSTGRES_STACK_ENDPOINT=postgres://postgres:5432
POSTGRES_DB=flowstack
POSTGRES_USER=postgres
POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
MONGODB_DB=flowstack
MONGODB_USER=flowstack
MONGODB_PASSWORD=${MONGODB_PASSWORD}
MONGODB_STACK_ENDPOINT=mongodb://mongodb:27017
MONGOGUI_STACK_URI=http://mongo-gui:4321
INFLUXDB_STACK_ENDPOINT=http://influxdb:8086
INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
INFLUXDB_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
REDIS_STACK_ENDPOINT=tcp://redis:6379
NPM_INIT_PASSWORD=${NPM_INIT_PASSWORD}
CLOUDBEAVER_AUTH_PROXY_PROVIDER_URI=http://cloudbeaver:8978
CLOUDBEAVER_ADMIN_USERNAME=cbadmin
CLOUDBEAVER_ADMIN_PASSWORD=${CLOUDBEAVER_ADMIN_PASSWORD}
GRAFANA_PUBLIC_URL=${GRAFANA_PUBLIC_URL}
GRAFANA_PUBLIC_PORT=43000
GRAFANA_AUTH_GENERIC_OAUTH_CLIENT_ID=${FLOWSTACK_LOCAL_OAUTH_CLIENT_ID}
GRAFANA_AUTH_GENERIC_OAUTH_CLIENT_SECRET=${FLOWSTACK_LOCAL_OAUTH_CLIENT_SECRET}
GRAFANA_AUTH_GENERIC_OAUTH_AUTH_URL=${FLOWSTACK_LOCAL_OAUTH_AUTH_ENDPOINT}
GRAFANA_AUTH_GENERIC_OAUTH_TOKEN_URL=${FLOWSTACK_LOCAL_OAUTH_TOKEN_ENDPOINT}
GRAFANA_AUTH_GENERIC_OAUTH_API_URL=${FLOWSTACK_LOCAL_USERINFO_API_ENDPOINT}
GRAFANA_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH=role == 'admin' && 'Admin' || role == 'editor' && 'Editor' || role == 'dashboard' && 'Viewer'
GRAFANA_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_STRICT=true
GRAFANA_AUTH_GENERIC_OAUTH_REQUIRED_ROLE=true
GRAFANA_STACK_ENDPOINT=http://grafana:3000
#GRAFANA_SECURITY_ADMIN_USER=admin
#GRAFANA_SECURITY_ADMIN_PASSWORD=LwkVfDcwL8dPTX5BZx7kyHA90xgJP7d6
EDITOR_ENDPOINT=http://web-editor:8080
FLOWSTACK_APP_MEMU=grafana,notebook,scada
FLOWSTACK_APP_MENU_GRAFANA_URI=${GRAFANA_PUBLIC_URL}
FLOWSTACK_APP_MENU_NOTEBOOK_URI=${FLOWSTACK_WWW_PUBLIC_URL}/jupyter
FLOWSTACK_APP_MENU_SCADA_URI=${SCADA_PUBLIC_URL}
FLOWSTACK_APP_MENU_SCADA_URI=${SCADA_PUBLIC_URL}
FLOWSTACK_MAX_USER=15
FLOWSTACK_NANOMQ_USERNAME=admin
FLOWSTACK_NANOMQ_PASSWORD=${FLOWSTACK_NANOMQ_PASSWORD}
FLOWSTACK_NANOMQ_USERNAME_SCADA=testScada
FLOWSTACK_NANOMQ_PASSWORD_SCADA=1234Scada
services:
flowstack:
image: harbor.nexpie.com/flowstack/flowstack:2.1.0-401-f4da43ab
# image: harbor.nexpie.com/flowstack/flowstack:2.1.0-394-5cec5f00
restart: always
ports:
- "${FLOWSTACK_PUBLIC_PORT}:80"
volumes:
- flowstack-flowengine:/app/store/flowdata
- ${WORKSPACE_HOST_PATH}:/workspace
- flowstack-storage:/app/volume
- /var/run/docker.sock:/var/run/docker.sock
- /usr/local/flowstack-volume/catalogue.json:/app/catalogue.json
environment:
- FLOWSTACK_NAME=${FLOWSTACK_NAME}
- FLOWENGINE_ENDPOINT=${FLOWENGINE_ENDPOINT}
- FLOWSTACK_JUPYTERNOTEBOOK_ENDPOINT=${JUPYTERNOTEBOOK_STACK_ENDPOINT}
- FLOWSTACK_CLOUDBEAVER_ENDPOINT=${CLOUDBEAVER_AUTH_PROXY_PROVIDER_URI}
# - FLOWSTACK_VSCODE_ENDPOINT=${VSCODE_STACK_ENDPOINT}
- FLOWSTACK_MONGOGUI_ENDPOINT=${MONGOGUI_STACK_URI}
- FLOWSTACK_INFLUXDB_ENDPOINT=${INFLUXDB_STACK_ENDPOINT}
- FLOWSTACK_EDITOR_ENDPOINT=${EDITOR_ENDPOINT}
- FLOWSTACK_INFLUXDB_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- FLOWSTACK_OAUTH_CLIENT_ID=${FLOWSTACK_OAUTH_CLIENT_ID}
- FLOWSTACK_OAUTH_CLIENT_SECRET=${FLOWSTACK_OAUTH_CLIENT_SECRET}
- FLOWSTACK_AUTH_PLATFORM_NAME=${FLOWSTACK_AUTH_PLATFORM_NAME}
- FLOWSTACK_AUTH_ENDPOINT=${FLOWSTACK_AUTH_ENDPOINT}
- FLOWSTACK_TOKEN_ENDPOINT=${FLOWSTACK_TOKEN_ENDPOINT}
- FLOWSTACK_USERINFO_API_ENDPOINT=${FLOWSTACK_USERINFO_API_ENDPOINT}
- FLOWSTACK_GQLV2_ENDPOINT=${FLOWSTACK_GQLV2_ENDPOINT}
- FLOWSTACK_OAUTH_LOGIN=${FLOWSTACK_OAUTH_LOGIN}
- FLOWSTACK_PASSWORD_LOGIN=${FLOWSTACK_PASSWORD_LOGIN}
- FLOWSTACK_ADMINISTRATOR_PASSWORD=${FLOWSTACK_ADMINISTRATOR_PASSWORD}
- FLOWSTACK_APP_MEMU=${FLOWSTACK_APP_MEMU}
- FLOWSTACK_APP_MENU_GRAFANA_URI=${FLOWSTACK_APP_MENU_GRAFANA_URI}
- FLOWSTACK_APP_MENU_NOTEBOOK_URI=${FLOWSTACK_APP_MENU_NOTEBOOK_URI}
- FLOWSTACK_APP_MENU_SCADA_URI=${FLOWSTACK_APP_MENU_SCADA_URI}
# - FLOWSTACK_PROJECT_ID=${FLOWSTACK_PROJECT_ID}
# - FLOWSTACK_USER_ID=${FLOWSTACK_USER_ID}
- FLOWSTACK_MAX_USER=${FLOWSTACK_MAX_USER}
- FLOWSTACK_API_MAX_LENGTH=${FLOWSTACK_API_MAX_LENGTH}
# - FLOWSTACK_CATALOGUE_PATH=${FLOWSTACK_CATALOGUE_PATH}
###### env สำหรับ services ข้างใน #####
- FLOWSTACK_VOLUME_HOST_PATH=${FLOWSTACK_VOLUME_HOST_PATH}
- INFLUXDB_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- FLOWSTACK_LOCAL_OAUTH_AUTH_ENDPOINT=${FLOWSTACK_LOCAL_OAUTH_AUTH_ENDPOINT}
- FLOWSTACK_LOCAL_OAUTH_TOKEN_ENDPOINT=${FLOWSTACK_LOCAL_OAUTH_TOKEN_ENDPOINT}
- FLOWSTACK_LOCAL_USERINFO_API_ENDPOINT=${FLOWSTACK_LOCAL_USERINFO_API_ENDPOINT}
- FLOWSTACK_WWW_PUBLIC_URL=${FLOWSTACK_WWW_PUBLIC_URL}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}
- GRAFANA_PUBLIC_URL=${GRAFANA_PUBLIC_URL}
- GRAFANA_STACK_ENDPOINT=${GRAFANA_STACK_ENDPOINT}
- GRAFANA_SECURITY_ADMIN_USER=grafana
- GRAFANA_SECURITY_ADMIN_PASSWORD=${GRAFANA_SECURITY_ADMIN_PASSWORD}
- WEBEDITOR_ENDPOINT=${EDITOR_ENDPOINT}
- FLOWSTACK_NANOMQ_USERNAME=${FLOWSTACK_NANOMQ_USERNAME}
- FLOWSTACK_NANOMQ_PASSWORD=${FLOWSTACK_NANOMQ_PASSWORD}
- FLOWSTACK_NANOMQ_USERNAME_SCADA=${FLOWSTACK_NANOMQ_USERNAME_SCADA}
- FLOWSTACK_NANOMQ_PASSWORD_SCADA=${FLOWSTACK_NANOMQ_PASSWORD_SCADA}
deploy:
resources:
limits:
cpus: "0.9"
memory: 1024m
nginx-proxy-manager:
image: harbor.nexpie.com/flowstack/nginx-proxy-manager:v1.0.1-3
# restart: always
# build:
# context: .
# dockerfile: Dockerfile
ports:
- "58081:81"
- "80:80"
- "443:443"
volumes:
- nginx-proxy-manager-data:/data
- nginx-proxy-manager-letsencrypt:/etc/letsencrypt
environment:
- NPM_INIT_EMAIL=contact@nexpie.com
- NPM_INIT_PASSWORD=${NPM_INIT_PASSWORD}
deploy:
resources:
limits:
cpus: "0.9"
memory: 1024m
volumes:
flowstack-storage:
driver: local
driver_opts:
device: ${FLOWSTACK_VOLUME_HOST_PATH}/
type: none
o: bind
flowstack-flowengine:
driver: local
driver_opts:
device: ${FLOWSTACK_VOLUME_HOST_PATH}/flowengine/flowdata
type: none
o: bind
nginx-proxy-manager-data:
driver: local
driver_opts:
device: ${FLOWSTACK_VOLUME_HOST_PATH}/nginx-proxy-manager/data
type: none
o: bind
nginx-proxy-manager-letsencrypt:
driver: local
driver_opts:
device: ${FLOWSTACK_VOLUME_HOST_PATH}/nginx-proxy-manager/letsencrypt
type: none
o: bind
networks:
default:
name: ${FLOWSTACK_NAME}
driver: bridge
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment