ft_transcendence/Docker.mk
Maieul BOYER 2ed524872b feat(docker): Multi stage docker now fetch deps once
Split dockerfile into three different dockerfiles such that dependencies
are only downloaded once

This allows the build to be a bit faster, since all deps are downloaded
once at the start.

This also makes it so the frontend container no longer needs to be ran,
as its files are directly embedded into the nginx container

This also remove the extra files, since bind mounts do work
it also remove the entrypoint.sh file, as you should prefer to not use
it
2025-12-30 19:02:07 +01:00

40 lines
730 B
Makefile

.PHONY: logs
# TODO: REMOVE THIS BEFORE LAUNCH
# this allows the us to only start the non-monitoring sercices
DOCKER_SERVICE= \
auth \
chat \
tic-tac-toe \
nginx \
user \
all: build
docker compose up -d $(DOCKER_SERVICE)
logs:
docker compose logs -f
down:
docker compose down
build:
docker compose build $(DOCKER_SERVICE)
re:
$(MAKE) -f ./Docker.mk clean
$(MAKE) -f ./Docker.mk all
clean:
docker compose down
prune: clean
-if ! [ -z $(shell docker ps -a -q) ] ; then \
docker stop $(shell docker ps -a -q); \
docker rm $(shell docker ps -a -q); \
fi
-docker image prune -a
-docker volume prune
-docker network prune
-docker system prune -a