84 lines
2.1 KiB
Makefile
84 lines
2.1 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)
|
|
|
|
buildncapp:
|
|
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) app
|
|
|
|
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
|
|
|
|
api_maj_config: api_crd api_composer_install api_updb api_cim api_cr
|
|
|
|
api_crd:
|
|
docker exec caravane-api-1 /bin/bash -c "drush cache-clear drush"
|
|
|
|
api_cr:
|
|
docker exec caravane-api-1 /bin/bash -c "drush cr"
|
|
|
|
api_updb:
|
|
docker exec caravane-api-1 /bin/bash -c "drush updb -y"
|
|
|
|
api_cim:
|
|
docker exec caravane-api-1 /bin/bash -c "drush config-import -y"
|
|
|
|
api_composer_install:
|
|
docker exec caravane-api-1 /bin/bash -c "composer install --no-dev"
|
|
|
|
down:
|
|
docker-compose down
|
|
|
|
exec_api:
|
|
docker exec -it caravane-api-1 bash
|
|
|
|
restart_api:
|
|
docker-compose restart api
|
|
|
|
exec_app:
|
|
docker exec -it caravane-app-1 bash
|
|
|
|
restart_app:
|
|
docker-compose restart app
|
|
|
|
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
|