Cosmostat Init Commit
This commit is contained in:
0
templates/cosmostat_api.service
Normal file
0
templates/cosmostat_api.service
Normal file
31
templates/cosmostat_settings.yaml
Normal file
31
templates/cosmostat_settings.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
|
||||
############################################
|
||||
# Matt-Cloud Cosmostat API Settings
|
||||
############################################
|
||||
|
||||
# Built {{ inventory_generation_timestamp }} by {{ jenkins_user }}
|
||||
inventory_generation_timestamp: "{{ inventory_generation_timestamp }}"
|
||||
jenkins_user: "{{ jenkins_user }}"
|
||||
ansible_hostname: "{{ ansible_hostname }}"
|
||||
|
||||
##################################################################
|
||||
### The cosmostat service is the foundation of the cosmostat platform
|
||||
### Each Matt-Cloud system will have the cosmostat service installed
|
||||
### This stores a short history of some system data in a python service
|
||||
### This system status service will be queriable locally only by default
|
||||
### It will also report back to the main cosmostat platform when queried and available
|
||||
##################################################################
|
||||
|
||||
# docker subnet, will use to bind the IP in default secure mode
|
||||
docker_subnet: "{{ docker_subnet }}"
|
||||
docker_gateway: "{{ docker_gateway }}"
|
||||
|
||||
# python system variables
|
||||
secure_api: {{ secure_api }}
|
||||
noisy_test: {{ noisy_test }}
|
||||
debug_output: {{ debug_output }}
|
||||
push_redis: {{ push_redis }}
|
||||
run_background : {{ run_background }}
|
||||
log_output: {{ log_output }}
|
||||
...
|
||||
69
templates/docker-compose.yaml
Normal file
69
templates/docker-compose.yaml
Normal file
@ -0,0 +1,69 @@
|
||||
# for now there is no php code
|
||||
# to save resources, also disabling nginx
|
||||
# will map 3000 to 80 here unless this changes
|
||||
|
||||
services:
|
||||
|
||||
redis:
|
||||
container_name: redis
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- {{ (docker_gateway + ':') if not secure_api else '' }}6379:6379
|
||||
networks:
|
||||
- cosmostat_net
|
||||
restart: always
|
||||
|
||||
ws_node:
|
||||
container_name: ws_node
|
||||
build:
|
||||
context: {{ service_control_web_folder }}/node_server
|
||||
dockerfile: Dockerfile
|
||||
image: ws_node:latest
|
||||
volumes:
|
||||
- {{ service_control_web_folder }}/html:/usr/src/app/public
|
||||
ports:
|
||||
# put back to 3000 if the stack is needed
|
||||
- {{ (docker_gateway + ':') if not secure_api else '' }}80:3000
|
||||
networks:
|
||||
- cosmostat_net
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
# these will be disabled until a stack is needed
|
||||
# web_dash:
|
||||
# container_name: web_dash
|
||||
# image: php:8.0-apache
|
||||
# ports:
|
||||
# - {{ (docker_gateway + ':') if not secure_api else '' }}8080:80
|
||||
# volumes:
|
||||
# - ./html:/var/www/html/
|
||||
# networks:
|
||||
# - cosmostat_net
|
||||
# restart: always
|
||||
#
|
||||
# nginx_proxy:
|
||||
# container_name: nginx_proxy
|
||||
# image: nginx:latest
|
||||
# ports:
|
||||
# - "{{ (docker_gateway + ':') if not secure_api else '' }}80:80"
|
||||
# volumes:
|
||||
# - ./proxy/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
# networks:
|
||||
# - cosmostat_net
|
||||
# restart: always
|
||||
# depends_on:
|
||||
# - web_dash
|
||||
# - ws_nodenetworks:
|
||||
|
||||
|
||||
networks:
|
||||
cosmostat_net:
|
||||
external: true
|
||||
# driver: bridge
|
||||
# ipam:
|
||||
# driver: default
|
||||
# config:
|
||||
# -
|
||||
# subnet: {{ docker_subnet }}
|
||||
|
||||
14
templates/service_template.service
Normal file
14
templates/service_template.service
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
[Unit]
|
||||
Description={{ service_name }}
|
||||
After=network.target
|
||||
{{ extra_options }}
|
||||
|
||||
[Service]
|
||||
WorkingDirectory={{ service_working_folder }}
|
||||
ExecStart={{ service_exe }}
|
||||
Restart=always
|
||||
{{ extra_service_options }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user