Mirrors the leshed project's Docker layout. src/ is a git submodule containing the Drupal codebase. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
77 lines
1.7 KiB
Makefile
77 lines
1.7 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)
|
|
DATE_NOW := $(shell date '+%Y-%m-%d_%H%M%S')
|
|
|
|
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)
|
|
|
|
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 figli_compta-php-1 /bin/bash -c "drush cache-clear drush"
|
|
|
|
composer_install:
|
|
docker exec figli_compta-php-1 /bin/bash -c "composer install --no-dev"
|
|
|
|
updb:
|
|
docker exec figli_compta-php-1 /bin/bash -c "drush updb -y"
|
|
|
|
cim:
|
|
docker exec figli_compta-php-1 /bin/bash -c "drush config-import -y"
|
|
|
|
cex:
|
|
docker exec figli_compta-php-1 /bin/bash -c "drush config-export -y"
|
|
|
|
cr:
|
|
docker exec figli_compta-php-1 /bin/bash -c "drush cr"
|
|
|
|
restart_nginx:
|
|
docker compose restart nginx
|
|
|
|
restart_php:
|
|
docker compose restart php
|
|
|
|
down:
|
|
docker compose down
|
|
|
|
exec_nginx:
|
|
docker exec -it figli_compta-nginx-1 bash
|
|
|
|
exec_php:
|
|
docker exec -it figli_compta-php-1 bash
|
|
|
|
exec_mysql:
|
|
docker exec -it figli_compta-mysql-1 bash
|
|
|
|
dump_db:
|
|
docker exec figli_compta-mysql-1 sh -c 'exec mariadb-dump -uroot -pfigli_compta figli_compta' > ./ressources/figli_compta-$(DATE_NOW)-local.sql
|