chore(cleanup): Fixed Makefile and Fully remove icons service
Changed so that Only non-monitoring services are launched by default (override by doing `make DOCKER_SERVICE=`) Fully removed the icons service (not yet in monitoring)
This commit is contained in:
parent
7ebd129faa
commit
762796417a
4 changed files with 17 additions and 41 deletions
39
Docker.mk
39
Docker.mk
|
|
@ -6,23 +6,33 @@
|
||||||
# By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ #
|
# By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2025/06/11 18:10:26 by maiboyer #+# #+# #
|
# Created: 2025/06/11 18:10:26 by maiboyer #+# #+# #
|
||||||
# Updated: 2025/11/19 13:52:55 by nrobinso ### ########.fr #
|
# Updated: 2025/12/12 14:56:10 by maiboyer ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
.PHONY: logs
|
.PHONY: logs
|
||||||
|
|
||||||
|
# TODO: REMOVE THIS BEFORE LAUNCH
|
||||||
|
# this allows the us to only start the non-monitoring sercices
|
||||||
|
DOCKER_SERVICE= \
|
||||||
|
auth \
|
||||||
|
chat \
|
||||||
|
frontend \
|
||||||
|
nginx \
|
||||||
|
user \
|
||||||
|
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
docker compose up -d
|
docker compose up -d $(DOCKER_SERVICE)
|
||||||
|
|
||||||
logs:
|
logs:
|
||||||
docker compose logs -f chat auth icons nginx
|
docker compose logs -f
|
||||||
|
|
||||||
down:
|
down:
|
||||||
docker compose down
|
docker compose down
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker compose build
|
docker compose build $(DOCKER_SERVICE)
|
||||||
|
|
||||||
re:
|
re:
|
||||||
$(MAKE) -f ./Docker.mk clean
|
$(MAKE) -f ./Docker.mk clean
|
||||||
|
|
@ -40,24 +50,3 @@ prune: clean
|
||||||
-docker volume prune
|
-docker volume prune
|
||||||
-docker network prune
|
-docker network prune
|
||||||
-docker system prune -a
|
-docker system prune -a
|
||||||
|
|
||||||
ES_URL ?= http://local.maix.me:9200
|
|
||||||
KIBANA_URL ?= http://local.maix.me:5601
|
|
||||||
|
|
||||||
logs-setup:
|
|
||||||
@until curl -s "$(ES_URL)" > /dev/null 2>&1; do sleep 1; done;
|
|
||||||
|
|
||||||
@curl -s -X PUT "$(ES_URL)/_ilm/policy/docker-logs-policy" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{"policy":{"phases":{"hot":{"actions":{}},"delete":{"min_age":"7d","actions":{"delete":{}}}}}}' > /dev/null
|
|
||||||
|
|
||||||
@curl -s -X PUT "$(ES_URL)/_template/docker-logs-template" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{"index_patterns":["docker-*"],"settings":{"index.lifecycle.name":"docker-logs-policy"}}' > /dev/null
|
|
||||||
|
|
||||||
@until curl -s "$(KIBANA_URL)/api/status" > /dev/null 2>&1; do sleep 1; done;
|
|
||||||
|
|
||||||
@curl -s -X POST "$(KIBANA_URL)/api/saved_objects/index-pattern/docker-logs" \
|
|
||||||
-H "kbn-xsrf: true" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{"attributes":{"title":"docker-*","timeFieldName":"@timestamp"}}' > /dev/null
|
|
||||||
|
|
|
||||||
6
Makefile
6
Makefile
|
|
@ -6,7 +6,7 @@
|
||||||
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
||||||
# Updated: 2025/11/24 17:02:33 by maiboyer ### ########.fr #
|
# Updated: 2025/12/12 14:55:40 by maiboyer ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
|
|
@ -70,8 +70,8 @@ header:
|
||||||
@$(ECHO) -e '$(GOLD) ****** ******* ****** $(END)'
|
@$(ECHO) -e '$(GOLD) ****** ******* ****** $(END)'
|
||||||
@$(ECHO) -e '$(GOLD) ****** $(END)'
|
@$(ECHO) -e '$(GOLD) ****** $(END)'
|
||||||
@$(ECHO) -e '$(GOLD) ****** $(END)'
|
@$(ECHO) -e '$(GOLD) ****** $(END)'
|
||||||
@$(ECHO) -e '$(GREY) Made by maiboyerlpb x bebou$(END)'
|
@$(ECHO) -e '$(GREY) $(END)'
|
||||||
@$(ECHO) -e '$(GREY) minou x dumbaless $(END)'
|
@$(ECHO) -e '$(GREY) $(END)'
|
||||||
@$(ECHO) -e -n $(MSG);
|
@$(ECHO) -e -n $(MSG);
|
||||||
|
|
||||||
PROJECT__NAME = $(CYAN)$(BOLD)$(UNDERLINE)FT_TRANSCENDENCE$(END)$(GOLD)
|
PROJECT__NAME = $(CYAN)$(BOLD)$(UNDERLINE)FT_TRANSCENDENCE$(END)$(GOLD)
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
# if you need to share files with nginx, you do it here.
|
# if you need to share files with nginx, you do it here.
|
||||||
- static-volume:/volumes/static
|
- static-volume:/volumes/static
|
||||||
- images-volume:/volumes/icons
|
|
||||||
environment:
|
environment:
|
||||||
# this can stay the same for developpement. This is an alias to `localhost`
|
# this can stay the same for developpement. This is an alias to `localhost`
|
||||||
- NGINX_DOMAIN=local.maix.me
|
- NGINX_DOMAIN=local.maix.me
|
||||||
|
|
@ -281,7 +280,6 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
images-volume:
|
|
||||||
sqlite-volume:
|
sqlite-volume:
|
||||||
static-volume:
|
static-volume:
|
||||||
grafana-data:
|
grafana-data:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#forward the post request to the microservice
|
|
||||||
location /api/icons/set/ {
|
|
||||||
rewrite ^/api/icons/set/(.*) $1 break;
|
|
||||||
proxy_pass http://icons/$uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
#handle the get request with nginx, since it does this well
|
|
||||||
location /api/icons/get/ {
|
|
||||||
rewrite ^/api/icons/get/(.*) /$1 break;
|
|
||||||
root /volumes/icons;
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue