Gobel is a headless cms built with golang.
This repository contains the code to run gobel in each environment.
Both local environment and production environment are assumed to be operated with docker-compose.
- gobel-api
- gobel-client-example
- gobel-admin-client-example
- gobel-example
- gobel-ops-example
- migrate-rubel-to-gobel
Work in ./docker-compose
directory.
make docker-create-network
If you want to check the operation, just copy .env.example. Of course, if you want to operate in a production environment, change the settings.
cp .env.example .env
There are three host names.
ex.
127.0.0.1 SERVER_NAME_OF_API # use GOBEL_NGINX_API_SERVER_NAME in .env
127.0.0.1 SERVER_NAME_OF_CLIENT # use GOBEL_NGINX_CLIENT_SERVER_NAME in .env
127.0.0.1 SERVER_NAME_OF_ADMIN_CLIENT # use GOBEL_NGINX_ADMIN_CLIENT_SERVER_NAME .env
make docker-compose-build
make docker-compose-up
Here is a fake data sql file that can be used for operation verification.
Application | URL |
---|---|
gobel-api | http:/SERVER_NAME_OF_API/ |
gobel-admin-client-example-example | http://SERVER_NAME_OF_ADMIN_CLIENT/ |
gobel-client-example | http://SERVER_NAME_OF_CLIENT/ |
prometheus | http://localhost:9090/graph |
node-exporter | http://localhost:9100/ |
mysqld-exporter | http://localhost:9104/ |
grafana | http://localhost:3000/ |
kibana | http://0.0.0.0:5601/ |
redis-insight | http://localhost:8001/ |
See gobel-ops-example for building infrastructure construction of the production environment.
Elasticsearch may not start when changing the version related to fluentd.
In that case, deleting /elasticsearch/nodes
may solve the problem.
gobel-grafana is up-to-date
Recreating gobel-elasticsearch ...
gobel-cadvisor is up-to-date
gobel-node-exporter is up-to-date
Recreating gobel-prometheus ...
Recreating gobel-elasticsearch ... done
Recreating gobel-prometheus ... done
ERROR: for kibana Container "72a9d83b3ef8" is unhealthy.
ERROR: for fluentd Container "72a9d83b3ef8" is unhealthy.
Encountered errors while bringing up the project.
make: *** [Makefile:20: docker-compose-up] Error 1
make: *** [deploy] Error 2
An example application using gobel-api.
An example application using gobel-api for admin.
A dashboard for monitoring various logs in cooperation with prometheus using cAdvisor, mysqld-exporter and node-exporter.
Monitor the resource usage and performance characteristics of running containers.
Monitor the MySQL server metrics.
Monitor system metrics provided by node exporter.
Prometheus is an open-source systems monitoring and alerting toolkit. Poll the exporter to collect resources and manage data.
Node exporter collects system metrics.
MySQL exporter collects MySQL server metrics.
Visualization of logs in cooperation with elasticsearch and fluentd.
- Application log
- gobel-api-*
- gobel-client-*
- DB log
- mysql-slow-*
- Web server log
- nginx-access-*
- nginx-error-*
The index name above is an example. See fluent.conf for details.
This project is licensed under the terms of the MIT license.
bmf - Software engineer.