From ffa47bd641c6b527a1a2ff6751e77edc47207be8 Mon Sep 17 00:00:00 2001 From: Triangle Function Date: Mon, 26 Jun 2023 00:38:33 +0900 Subject: [PATCH] Update run.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dx용 entrypoint script를 추가했습니다. --- .docker/run.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.docker/run.sh b/.docker/run.sh index 16b13d72..a05d4dcf 100644 --- a/.docker/run.sh +++ b/.docker/run.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -ex @@ -21,6 +21,15 @@ done if [ "$1" = "test" ]; then venv/bin/python manage.py compilemessages -l en -l ko venv/bin/pytest tests --verbose +elif [ "$1" = "dx" ]; then + if [ ! -f .init.lock.log ]; then + venv/bin/python manage.py collectstatic --noinput + venv/bin/python manage.py migrate --no-input + venv/bin/python manage.py compilemessages -l en -l ko + touch .init.lock.log + fi + source venv/bin/activate; + sleep infinity else venv/bin/python manage.py collectstatic --noinput venv/bin/python manage.py migrate --no-input