-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (48 loc) · 1.92 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
include .env
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
all: clear-cache-all build up composer-install db-migrate var-preps cleanup-updates
restart: down up
build:
@echo "Building containers"
@docker compose --env-file .env build
up:
@echo "Starting containers"
@docker compose --env-file .env up -d --remove-orphans
down:
@echo "Stopping containers"
@docker compose --env-file .env down
composer-install:
@echo "Running composer install"
@docker exec -it ${APP_NAME}.service.app composer install
composer-update:
@echo "Running composer update"
@docker exec -it ${APP_NAME}.service.app composer update
var-preps:
@echo "Settings on var dir"
@sudo touch /var/supervisor.pid
@sudo chmod -R 777 var/*
db-migrate:
@echo "Running database migrations"
@docker exec -it -u www-data ${APP_NAME}.service.app php bin/console --no-interaction doctrine:migration:migrate
db-migration-generate:
@echo "Running database migration generate"
@docker exec -it -u www-data ${APP_NAME}.service.app php bin/console --no-interaction doctrine:migration:generate
db-migration-rollback:
@echo "Running database migration rollback"
@docker exec -it -u www-data ${APP_NAME}.service.app php bin/console --no-interaction doctrine:migrations:migrate prev
refresh-partitions:
@echo "Running refresh partitions"
@docker exec -it -u www-data ${APP_NAME}.service.app php bin/console --no-interaction app:refresh-game-history-partitions
cleanup-updates:
@echo "Running refresh partitions"
@docker exec -it -u www-data ${APP_NAME}.service.app php bin/console --no-interaction app:telegram:clear-updates
clear-cache:
@echo "Clearing global cache"
@docker exec -it -u www-data ${APP_NAME}.service.app php bin/console --no-interaction cache:pool:clear cache.global_clearer
clear-all: clear-cache-all clear-logs-all
clear-cache-all:
@echo "Clearing all cache"
@rm -rf var/cache/*
clear-logs-all:
@echo "Clearing all logs"
@rm -rf var/log/*