-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from kamikazebr/dev
Merge Dev to Main
- Loading branch information
Showing
17 changed files
with
298 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Rules and targets in Makefile1 | ||
|
||
up-all: | ||
@echo "Uping API, Vector and Discord" | ||
# To execute the default target from Makefile2 in another folder, use $(MAKE) -C path/to/directory | ||
$(MAKE) -f vector_server/Makefile up | ||
@echo "Uping ML" | ||
$(MAKE) -f ml/Makefile up | ||
@echo "Uping Discord" | ||
$(MAKE) -f discord/Makefile up | ||
@echo "Uping Complete" | ||
|
||
down-all: | ||
@echo "Downing API, Vector and Discord" | ||
# To execute the default target from Makefile2 in another folder, use $(MAKE) -C path/to/directory | ||
$(MAKE) -f discord/Makefile down | ||
@echo "Downing ML" | ||
$(MAKE) -f ml/Makefile down | ||
@echo "Downing Vector" | ||
$(MAKE) -f vector_server/Makefile down | ||
@echo "Downing Complete" | ||
|
||
|
||
restart-all: | ||
@echo "Restarting API, Vector and Discord" | ||
$(MAKE) -f vector_server/Makefile restart | ||
@echo "Restarting ML" | ||
$(MAKE) -f ml/Makefile restart | ||
@echo "Restarting Discord" | ||
$(MAKE) -f discord/Makefile restart | ||
@echo "Restarting Complete" | ||
|
||
build-all: | ||
@echo "Building API, Vector and Discord" | ||
$(MAKE) -f vector_server/Makefile build | ||
@echo "Building ML" | ||
$(MAKE) -f ml/Makefile build | ||
@echo "Building Discord" | ||
$(MAKE) -f discord/Makefile build | ||
@echo "Building Complete" | ||
|
||
.PHONY: up-all down-all build-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Makefile for running Docker Compose commands with conditional -f option | ||
|
||
# Default Docker Compose file | ||
COMPOSE_FILE = docker-compose.dev.yml | ||
|
||
# Check if the 'prod' option is set | ||
ifdef prod | ||
COMPOSE_FILE = docker-compose.yml | ||
endif | ||
|
||
# Default service name | ||
SERVICE = hivemind_api | ||
|
||
# Check if the 'service' option is set | ||
ifdef service | ||
SERVICE = $(service) | ||
endif | ||
|
||
# Default target (when you run just "make" without specifying a target) | ||
default: up | ||
|
||
# Target to start the specified service using Docker Compose | ||
up: | ||
docker compose -f $(COMPOSE_FILE) up -d $(SERVICE) | ||
|
||
# Target to view the logs of the specified service using Docker Compose | ||
logs-full: | ||
docker compose -f $(COMPOSE_FILE) logs $(SERVICE) -f | ||
|
||
logs: | ||
docker compose -f $(COMPOSE_FILE) logs $(SERVICE) -f -n 50 -t | ||
|
||
# Target to stop and remove the specified service using Docker Compose | ||
down: | ||
docker compose -f $(COMPOSE_FILE) down $(SERVICE) | ||
|
||
# Target to stop the specified service using Docker Compose (without removing it) | ||
stop: | ||
docker compose -f $(COMPOSE_FILE) stop $(SERVICE) | ||
|
||
# Target to restart the specified service using Docker Compose | ||
restart: | ||
docker compose -f $(COMPOSE_FILE) restart $(SERVICE) | ||
|
||
# Target to rebuild the specified service using Docker Compose | ||
build: | ||
docker compose -f $(COMPOSE_FILE) up -d --build $(SERVICE) | ||
|
||
# Target to show help message (list available targets) | ||
help: | ||
@echo "Available targets:" | ||
@echo " up - Start the specified service using Docker Compose" | ||
@echo " logs - View the logs of the specified service using Docker Compose" | ||
@echo " down - Stop and remove the specified service using Docker Compose" | ||
@echo " stop - Stop the specified service using Docker Compose (without removing it)" | ||
@echo " restart - Restart the specified service using Docker Compose" | ||
@echo " build - Rebuild the specified service using Docker Compose" | ||
@echo " help - Show this help message" | ||
|
||
.PHONY: up logs down stop restart build help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
version: "3" | ||
networks: | ||
vector_server_default: | ||
external: | ||
name: vector_server_default | ||
external: true | ||
services: | ||
hivemind_api: | ||
restart: unless-stopped | ||
ports: | ||
- "3333:3333" | ||
networks: | ||
- vector_server_default | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
dockerfile: dev.Dockerfile | ||
env_file: | ||
- .env | ||
# volumes: | ||
# - ./:/project/ | ||
# command: [ "python","/project/src/api.py" ] | ||
volumes: | ||
- ./src:/project/src | ||
command: [ "python","/project/src/api.py" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Makefile for running Docker Compose commands with conditional -f option | ||
|
||
# Default Docker Compose file | ||
COMPOSE_FILE = docker-compose.dev.yml | ||
|
||
# Check if the 'prod' option is set | ||
ifdef prod | ||
COMPOSE_FILE = docker-compose.yml | ||
endif | ||
|
||
# Default service name | ||
SERVICE = vector_api_dev | ||
|
||
# Check if the 'service' option is set | ||
ifdef service | ||
SERVICE = $(service) | ||
endif | ||
|
||
# Default target (when you run just "make" without specifying a target) | ||
default: up | ||
|
||
# Target to start the specified service using Docker Compose | ||
up: | ||
docker compose -f $(COMPOSE_FILE) up -d $(SERVICE) | ||
|
||
# Target to view the logs of the specified service using Docker Compose | ||
logs-full: | ||
docker compose -f $(COMPOSE_FILE) logs $(SERVICE) -f | ||
|
||
logs: | ||
docker compose -f $(COMPOSE_FILE) logs $(SERVICE) -f -n 50 -t | ||
|
||
# Target to stop and remove the specified service using Docker Compose | ||
down: | ||
docker compose -f $(COMPOSE_FILE) down $(SERVICE) | ||
|
||
# Target to stop the specified service using Docker Compose (without removing it) | ||
stop: | ||
docker compose -f $(COMPOSE_FILE) stop $(SERVICE) | ||
|
||
# Target to restart the specified service using Docker Compose | ||
restart: | ||
docker compose -f $(COMPOSE_FILE) restart $(SERVICE) | ||
|
||
# Target to rebuild the specified service using Docker Compose | ||
build: | ||
docker compose -f $(COMPOSE_FILE) up -d --build $(SERVICE) | ||
|
||
# Target to show help message (list available targets) | ||
help: | ||
@echo "Available targets:" | ||
@echo " up - Start the specified service using Docker Compose" | ||
@echo " logs - View the logs of the specified service using Docker Compose" | ||
@echo " down - Stop and remove the specified service using Docker Compose" | ||
@echo " stop - Stop the specified service using Docker Compose (without removing it)" | ||
@echo " restart - Restart the specified service using Docker Compose" | ||
@echo " build - Rebuild the specified service using Docker Compose" | ||
@echo " help - Show this help message" | ||
|
||
.PHONY: up logs down stop restart build help |
Oops, something went wrong.