Skip to content

Commit

Permalink
Remove our copy of the wait-for-it script (cvat-ai#8572)
Browse files Browse the repository at this point in the history
Nowadays it's available from the Ubuntu repositories, so install it from
there. This declutters our root directory a bit, plus it makes
enumerating 3rd-party dependencies easier.
  • Loading branch information
SpecLad authored Oct 22, 2024
1 parent 2cca2dd commit 1d4632c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 184 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ RUN apt-get update && \
supervisor \
tzdata \
unrar \
wait-for-it \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
rm -rf /var/lib/apt/lists/* && \
Expand Down Expand Up @@ -192,7 +193,7 @@ RUN python -m pip uninstall -y pip
COPY cvat/nginx.conf /etc/nginx/nginx.conf
COPY --chown=${USER} components /tmp/components
COPY --chown=${USER} supervisord/ ${HOME}/supervisord
COPY --chown=${USER} wait-for-it.sh manage.py backend_entrypoint.sh wait_for_deps.sh ${HOME}/
COPY --chown=${USER} manage.py backend_entrypoint.sh wait_for_deps.sh ${HOME}/
COPY --chown=${USER} utils/ ${HOME}/utils
COPY --chown=${USER} cvat/ ${HOME}/cvat
COPY --chown=${USER} rqscheduler.py ${HOME}
Expand Down
4 changes: 2 additions & 2 deletions backend_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fail() {
}

wait_for_db() {
~/wait-for-it.sh "${CVAT_POSTGRES_HOST}:${CVAT_POSTGRES_PORT:-5432}" -t 0
wait-for-it "${CVAT_POSTGRES_HOST}:${CVAT_POSTGRES_PORT:-5432}" -t 0
}

cmd_bash() {
Expand All @@ -19,7 +19,7 @@ cmd_init() {
wait_for_db
~/manage.py migrate

~/wait-for-it.sh "${CVAT_REDIS_INMEM_HOST}:${CVAT_REDIS_INMEM_PORT:-6379}" -t 0
wait-for-it "${CVAT_REDIS_INMEM_HOST}:${CVAT_REDIS_INMEM_PORT:-6379}" -t 0
~/manage.py syncperiodicjobs
}

Expand Down
178 changes: 0 additions & 178 deletions wait-for-it.sh

This file was deleted.

6 changes: 3 additions & 3 deletions wait_for_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# but it's too resource-intensive to execute for every worker we might be running
# in a container. Instead, it's in backend_entrypoint.sh.

~/wait-for-it.sh "${CVAT_POSTGRES_HOST}:${CVAT_POSTGRES_PORT:-5432}" -t 0
~/wait-for-it.sh "${CVAT_REDIS_INMEM_HOST}:${CVAT_REDIS_INMEM_PORT}" -t 0
~/wait-for-it.sh "${CVAT_REDIS_ONDISK_HOST}:${CVAT_REDIS_ONDISK_PORT}" -t 0
wait-for-it "${CVAT_POSTGRES_HOST}:${CVAT_POSTGRES_PORT:-5432}" -t 0
wait-for-it "${CVAT_REDIS_INMEM_HOST}:${CVAT_REDIS_INMEM_PORT}" -t 0
wait-for-it "${CVAT_REDIS_ONDISK_HOST}:${CVAT_REDIS_ONDISK_PORT}" -t 0

exec "$@"

0 comments on commit 1d4632c

Please sign in to comment.