2021-02-28 23:20:59 +00:00
|
|
|
DOCKER_COMPOSE = COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose
|
|
|
|
DOCKER_RUN = ${DOCKER_COMPOSE} run -e UID=`id -u` -e GID=`id -g`
|
2021-02-27 20:07:48 +00:00
|
|
|
MANAGE = ${DOCKER_RUN} backend python /app/src/manage.py
|
2018-06-23 19:08:56 +00:00
|
|
|
|
|
|
|
lint:
|
2019-08-31 22:25:25 +00:00
|
|
|
poetry run pre-commit run --all
|
2018-06-23 19:08:56 +00:00
|
|
|
|
2021-02-27 20:07:48 +00:00
|
|
|
run:
|
2021-02-28 23:20:59 +00:00
|
|
|
${DOCKER_COMPOSE} up --build
|
2021-02-27 20:07:48 +00:00
|
|
|
|
|
|
|
build:
|
2021-02-28 23:20:59 +00:00
|
|
|
${DOCKER_COMPOSE} build
|
2021-02-27 20:07:48 +00:00
|
|
|
|
2021-02-28 22:55:01 +00:00
|
|
|
makemessages:
|
|
|
|
${MANAGE} makemessages -a
|
|
|
|
|
2021-02-27 20:07:48 +00:00
|
|
|
makemigrations:
|
|
|
|
${MANAGE} makemigrations ${EXTRA_ARGS}
|
|
|
|
|
|
|
|
migrate:
|
|
|
|
${MANAGE} migrate ${EXTRA_ARGS}
|
|
|
|
|
|
|
|
createsuperuser:
|
|
|
|
${MANAGE} createsuperuser
|
|
|
|
|
|
|
|
shell:
|
|
|
|
${MANAGE} shell
|
|
|
|
|
|
|
|
manage_command:
|
|
|
|
${MANAGE} ${COMMAND}
|
|
|
|
|
2018-06-23 19:08:56 +00:00
|
|
|
test:
|
2021-02-27 20:07:48 +00:00
|
|
|
${DOCKER_RUN} backend pytest src/
|
2021-02-28 23:15:01 +00:00
|
|
|
|
|
|
|
add_dependency:
|
|
|
|
${DOCKER_RUN} backend poetry add --lock ${DEPENDENCY}
|
|
|
|
|
|
|
|
add_dev_dependency:
|
|
|
|
${DOCKER_RUN} backend poetry add -D --lock ${DEPENDENCY}
|