docker-caravane/Makefile

78 lines
2.0 KiB
Makefile

#!/usr/bin/make
SHELL = /bin/sh
USER_UID := $(shell id -u)
USER_UNAME := $(shell id -un)
USER_GID := $(shell id -g)
USER_GNAME := $(shell id -gn)
export USER_UID
export USER_UNAME
export USER_GID
export USER_GNAME
pull:
docker-compose pull
build:
docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
buildnc:
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
buildncphp:
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) php
buildnginx:
docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) nginx
buildncnginx:
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) nginx
downbuildup: down build up
up:
docker-compose up -d
ps:
docker-compose ps
logs:
docker-compose logs -f
maj_config: crd composer_install updb cim cr
crd:
docker exec caravane-php-1 /bin/bash -c "drush cache-clear drush"
cr:
docker exec caravane-php-1 /bin/bash -c "drush cr"
updb:
docker exec caravane-php-1 /bin/bash -c "drush updb -y"
cim:
docker exec caravane-php-1 /bin/bash -c "drush config-import -y"
composer_install:
docker exec caravane-php-1 /bin/bash -c "composer install --no-dev"
down:
docker-compose down
exec_php:
docker exec -it caravane-php-1 bash
restart_php:
docker-compose restart php
exec_mysql:
docker exec -it caravane-mysql-1 bash
restart_nginx:
docker-compose restart nginx
dump_db:
docker exec caravane-mysql-1 sh -c 'exec mysqldump -uroot -pcaravane caravane' > ./ressources/caravane-$(DATE_NOW)-local.sql