2024-06-18 15:03:29 +02: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)
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
2024-07-09 12:48:06 +02:00
|
|
|
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
|
2024-06-18 15:03:29 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-07-09 12:48:06 +02:00
|
|
|
maj_config: crd composer_install updb cim cr
|
2024-06-18 15:03:29 +02:00
|
|
|
|
2024-07-09 12:48:06 +02:00
|
|
|
crd:
|
2024-07-09 15:24:56 +02:00
|
|
|
docker exec caravane-php-1 /bin/bash -c "drush cache-clear drush"
|
2024-06-18 15:03:29 +02:00
|
|
|
|
2024-07-09 12:48:06 +02:00
|
|
|
cr:
|
2024-07-09 15:24:56 +02:00
|
|
|
docker exec caravane-php-1 /bin/bash -c "drush cr"
|
2024-06-18 15:03:29 +02:00
|
|
|
|
2024-07-09 12:48:06 +02:00
|
|
|
updb:
|
2024-07-09 15:24:56 +02:00
|
|
|
docker exec caravane-php-1 /bin/bash -c "drush updb -y"
|
2024-06-18 15:03:29 +02:00
|
|
|
|
2024-07-09 12:48:06 +02:00
|
|
|
cim:
|
2024-07-09 15:24:56 +02:00
|
|
|
docker exec caravane-php-1 /bin/bash -c "drush config-import -y"
|
2024-06-18 15:03:29 +02:00
|
|
|
|
2024-07-09 12:48:06 +02:00
|
|
|
composer_install:
|
2024-07-09 15:24:56 +02:00
|
|
|
docker exec caravane-php-1 /bin/bash -c "composer install --no-dev"
|
2024-06-18 15:03:29 +02:00
|
|
|
|
|
|
|
down:
|
|
|
|
docker-compose down
|
|
|
|
|
2024-07-09 15:24:56 +02:00
|
|
|
exec_php:
|
|
|
|
docker exec -it caravane-php-1 bash
|
2024-06-18 15:03:29 +02:00
|
|
|
|
2024-07-09 15:24:56 +02:00
|
|
|
restart_php:
|
|
|
|
docker-compose restart php
|
2024-06-18 15:03:29 +02:00
|
|
|
|
|
|
|
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
|