Browse Source

finished to cleanup makefiles and docker-compose.yml

master
nicolas-arnaud 2 years ago
parent
commit
4e30f64f26
  1. 12
      Makefile
  2. 15
      Makesudo
  3. 4
      docker-compose.yml

12
Makefile

@ -6,14 +6,6 @@ all: clean dev
dev: dev:
docker-compose up --build docker-compose up --build
check:
NODE_ENV="check" docker-compose run back --build
NODE_ENV="check" docker-compose run front --build
docker-compose down
debug:
NODE_ENV="debug" BUILDKIT_PROGRESS=plain docker-compose up --build
stop: stop:
docker-compose down docker-compose down
@ -21,9 +13,11 @@ clean: stop
docker system prune -f docker system prune -f
fclean: stop fclean: stop
rm -rf postgres
rm -rf back/volumes/avatars
rm -rf */node_modules rm -rf */node_modules
docker system prune -af --volumes docker system prune -af --volumes
re: fclean dev re: fclean dev
.PHONY: all dev check debug stop clean fclean re .PHONY: all dev stop clean fclean re

15
Makesudo

@ -3,20 +3,9 @@ USER = gavaniwast
all: clean dev all: clean dev
prod:
sudo docker-compose up --build
dev: dev:
sudo docker-compose up --build sudo docker-compose up --build
check:
sudo NODE_ENV="check" docker-compose run back --build
sudo NODE_ENV="check" docker-compose run front --build
sudo docker compose -f docker-compose.yml down
debug:
sudo NODE_ENV="debug" BUILDKIT_PROGRESS=plain docker-compose up --build
stop: stop:
sudo docker-compose down sudo docker-compose down
@ -24,9 +13,11 @@ clean: stop
sudo docker system prune -f sudo docker system prune -f
fclean: stop fclean: stop
sudo rm -rf postgres
sudo rm -rf back/avatars
sudo rm -rf */node_modules sudo rm -rf */node_modules
sudo docker system prune -af --volumes sudo docker system prune -af --volumes
re: fclean dev re: fclean dev
.PHONY: all prod dev check debug stop clean fclean re .PHONY: all dev stop clean fclean re

4
docker-compose.yml

@ -10,8 +10,6 @@ services:
context: ./ context: ./
dockerfile: front.dockerfile dockerfile: front.dockerfile
env_file: .env env_file: .env
environment:
- NODE_ENV=${NODE_ENV}
depends_on: [postgres, back] depends_on: [postgres, back]
ports: [80:80] ports: [80:80]
volumes: [./front:/var/www/html] volumes: [./front:/var/www/html]
@ -23,8 +21,6 @@ services:
context: ./ context: ./
dockerfile: back.dockerfile dockerfile: back.dockerfile
env_file: .env env_file: .env
environment:
- NODE_ENV=${NODE_ENV}
depends_on: [postgres] depends_on: [postgres]
ports: [3001:3001] ports: [3001:3001]
networks: [transcendence] networks: [transcendence]

Loading…
Cancel
Save