2022-04-07 13:07:00 +02:00
|
|
|
CI_COMPOSE=FIXUID=$(shell id -u) FIXGID=$(shell id -g) docker-compose -f docker-compose.yml
|
2022-12-13 15:46:24 +01:00
|
|
|
HYDRA_SQL_SHELL_USER ?= www-data:
|
|
|
|
DOCKER_CMD ?=
|
|
|
|
DOCKER_IMAGE_NAME ?= login-app-sql_hydra-sql
|
2022-04-07 13:07:00 +02:00
|
|
|
up:
|
|
|
|
FIXUID=$(shell id -u) FIXGID=$(shell id -g) docker-compose up --build
|
|
|
|
|
|
|
|
down:
|
|
|
|
docker-compose down -v
|
|
|
|
|
|
|
|
purge:
|
|
|
|
docker-compose down -v --remove-orphans --rmi local
|
|
|
|
|
2022-12-13 15:46:24 +01:00
|
|
|
hydra-sql-shell:
|
2022-04-07 13:07:00 +02:00
|
|
|
$(CI_COMPOSE) exec \
|
2022-12-13 15:46:24 +01:00
|
|
|
-u "$(HYDRA_SQL_SHELL_USER)" \
|
|
|
|
hydra-sql \
|
|
|
|
/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
APP_LOCALES ?= fr,en
|
|
|
|
HYDRA_ADMIN_BASE_URL ?= http://hydra:4445
|
|
|
|
TRUSTED_PROXIES ?= 127.0.0.1,REMOTE_ADDR,localhost
|
|
|
|
ISSUER_URL ?= http://localhost:8000
|
|
|
|
BASE_URL ?= http://localhost:8080
|
|
|
|
DB_USER ?= lasql
|
|
|
|
DB_PASSWORD ?= lasql
|
|
|
|
DEFAULT_LOCALE ?= fr
|
|
|
|
BDD ?= postgres
|
|
|
|
DSN_REMOTE_DATABASE=mysql:host=mariadb;port=3306;dbname=lasql
|
|
|
|
|
|
|
|
up-mysql:
|
|
|
|
docker run \
|
|
|
|
-it --rm \
|
|
|
|
-p 8080:80 \
|
|
|
|
-e APP_LOCALES=$(APP_LOCALES) \
|
|
|
|
-e HYDRA_ADMIN_BASE_URL=$(HYDRA_ADMIN_BASE_URL) \
|
|
|
|
-e TRUSTED_PROXIES=$(TRUSTED_PROXIES) \
|
|
|
|
-e ISSUER_URL=$(ISSUER_URL) \
|
|
|
|
-e BASE_URL=$(BASE_URL) \
|
|
|
|
-e DB_USER=$(DB_USER) \
|
|
|
|
-e DB_PASSWORD=$(DB_PASSWORD) \
|
|
|
|
-e DEFAULT_LOCALE=$(DEFAULT_LOCALE) \
|
|
|
|
-e DSN_REMOTE_DATABASE=$(DSN_REMOTE_DATABASE) \
|
|
|
|
$(DOCKER_IMAGE_NAME):latest \
|
|
|
|
$(DOCKER_CMD)
|