Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ MICROSERVICES_NOTIFICATION_INTERNAL_PORT=50055
MICROSERVICES_THE_MONKEYS_AI_ENGINE=the_monkeys_ai_engine
MICROSERVICES_AI_ENGINE_PORT=50057
MICROSERVICES_AI_ENGINE_INTERNAL_PORT=50057
MICROSERVICE_REPORTS_SERVICE=the_monkeys_reports
MICROSERVICE_REPORTS_SERVICE_PORT=50058
MICROSERVICE_REPORTS_SERVICE_INTERNAL_PORT=50058
MICROSERVICES_AI_ENGINE_HEALTH_PORT=51600
MICROSERVICES_AI_ENGINE_HEALTH_INTERNAL_PORT=51600
MICROSERVICES_THE_MONKEYS_ACTIVITY=the_monkeys_activity
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
build_args: ""
- name: activity
dockerfile: microservices/the_monkeys_activity/Dockerfile
context: .
- name: reports
dockerfile: ./microservices/the_monkeys_reports/Dockerfile
context: ./microservices/the_monkeys_reports
build_args: ""

steps:
Expand Down Expand Up @@ -295,4 +297,4 @@ jobs:
echo "🚀 To deploy:"
echo "1. Use your existing docker-compose.yml for infrastructure services"
echo "2. Update microservice image references to use registry images above"
echo "3. Or use docker-compose.registry.yml alongside your infrastructure setup"
echo "3. Or use docker-compose.registry.yml alongside your infrastructure setup"
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "monkeys_protos"]
path = monkeys_protos
url = https://github.com/the-monkeys/monkeys_protos.git
35 changes: 34 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,37 @@ proto-gen:


freeze:
pip freeze > requirements.txt
pip freeze > requirements.txt


include .env

APP_ENV ?= development

ifeq ($(APP_ENV), production)
COMPOSE_FILE_EXTENSION := .prod.yml
CONTAINER_RUNTIME := docker
else
COMPOSE_FILE_EXTENSION := .yml
endif

ifneq (, $(shell which podman))
CONTAINER_RUNTIME := podman
endif

ifneq (, $(shell which docker))
CONTAINER_RUNTIME := docker
endif

# List of compose files of our services
REPORTS_COMPOSE := microservices/the_monkeys_reports/docker-compose$(COMPOSE_FILE_EXTENSION)
ROOT_COMPOSE := docker-compose$(COMPOSE_FILE_EXTENSION)

containers/up:
$(CONTAINER_RUNTIME) compose -f $(ROOT_COMPOSE) -f $(REPORTS_COMPOSE) --env-file .env up

containers/down:
$(CONTAINER_RUNTIME) compose -f $(ROOT_COMPOSE) -f $(REPORTS_COMPOSE) down

containers/logs:
$(CONTAINER_RUNTIME) compose -f $(ROOT_COMPOSE) -f $(REPORTS_COMPOSE) logs -f
7 changes: 7 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ type Microservices struct {
TheMonkeysActivity string `mapstructure:"the_monkeys_activity"`
ActivityPort int `mapstructure:"activity_port"`
ActivityInternalPort int `mapstructure:"activity_internal_port"`

ReportsService string `mapstructure:"reports_service"`
ReportsServicePort int `mapstructure:"reports_service_port"`
ReportsServiceInternalPort int `mapstructure:"reports_service_internal_port"`
}

type Database struct {
Expand Down Expand Up @@ -256,6 +260,9 @@ func bindEnvVars() {
viper.BindEnv("microservices.the_monkeys_activity", "MICROSERVICES_THE_MONKEYS_ACTIVITY")
viper.BindEnv("microservices.activity_port", "MICROSERVICES_ACTIVITY_PORT")
viper.BindEnv("microservices.activity_internal_port", "MICROSERVICES_ACTIVITY_INTERNAL_PORT")
viper.BindEnv("microservices.reports_service", "MICROSERVICE_REPORTS_SERVICE")
viper.BindEnv("microservices.reports_service_port", "MICROSERVICE_REPORTS_SERVICE_PORT")
viper.BindEnv("microservices.reports_service_internal_port", "MICROSERVICE_REPORTS_SERVICE_INTERNAL_PORT")

// PostgreSQL
viper.BindEnv("postgresql.primary_db.db_username", "POSTGRESQL_PRIMARY_DB_DB_USERNAME")
Expand Down
Loading
Loading