docker-quartiersdedemain/Makefile

81 lines
1.8 KiB
Makefile
Raw Normal View History

2024-02-20 11:18:05 +01:00
#!/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)
DATE_NOW := $(shell date '+%Y-%m-%d_%H%M%S')
export USER_UID
export USER_UNAME
export USER_GID
export USER_GNAME
# export DATE_NOW
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)
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 pag #dev.phpmyadmin.q2d.fr
crd:
2024-02-23 16:42:47 +01:00
docker exec q2d-php-1 /bin/bash -c "vendor/bin/drush cache-clear drush"
2024-02-20 11:18:05 +01:00
composer_install:
docker exec q2d-php-1 /bin/bash -c "composer install --no-dev"
updb:
2024-02-23 16:42:47 +01:00
docker exec q2d-php-1 /bin/bash -c "vendor/bin/drush updb -y"
2024-02-20 11:18:05 +01:00
cim:
2024-02-23 16:42:47 +01:00
docker exec q2d-php-1 /bin/bash -c "vendor/bin/drush config-import -y"
2024-02-20 11:18:05 +01:00
# sync_struct:
2024-02-23 16:42:47 +01:00
# docker exec q2d-php-1 /bin/bash -c "vendor/bin/drush im --choice safe && drush ib --choice full"
2024-02-20 11:18:05 +01:00
cr:
2024-02-23 16:42:47 +01:00
docker exec q2d-php-1 /bin/bash -c "vendor/bin/drush cr"
2024-02-20 11:18:05 +01:00
pag:
2024-02-23 16:42:47 +01:00
docker exec q2d-php-1 /bin/bash -c "vendor/bin/drush pag all canonical_entities:node && vendor/bin/drush pag all canonical_entities:taxonomy_term"
2024-02-20 11:18:05 +01:00
restart_nginx:
docker-compose restart nginx
restart_php:
docker-compose restart php
down:
docker-compose down
exec_nginx:
docker exec -it q2d-nginx-1 bash
exec_php:
docker exec -it q2d-php-1 bash
exec_mysql:
docker exec -it q2d-mysql-1 bash
dump_db:
docker exec q2d-mysql-1 sh -c 'exec mysqldump -uroot -pq2d q2d' > ./ressources/q2d-$(DATE_NOW)-local.sql