mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-16 08:19:05 +00:00
feature: docker development environment (#544)
Add docker support It's self-contained so should not interfere with anything else and can easily be thrown out if nobody wants it anymore.
This commit is contained in:
32
.docker/entrypoint-sync.sh
Executable file
32
.docker/entrypoint-sync.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# set +x
|
||||
|
||||
pushd /nyaa
|
||||
|
||||
echo 'Waiting for MySQL to start up'
|
||||
while ! echo HELO | nc mariadb 3306 &>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
echo 'DONE'
|
||||
|
||||
echo 'Waiting for ES to start up'
|
||||
while ! echo HELO | nc elasticsearch 9200 &>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
echo 'DONE'
|
||||
|
||||
echo 'Waiting for ES to be ready'
|
||||
while ! curl -s -XGET 'elasticsearch:9200/_cluster/health?pretty=true&wait_for_status=green' &>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
echo 'DONE'
|
||||
|
||||
echo 'Waiting for sync data file to exist'
|
||||
while ! [ -f /elasticsearch-sync/pos.json ]; do
|
||||
sleep 1
|
||||
done
|
||||
echo 'DONE'
|
||||
|
||||
echo 'Starting the sync process'
|
||||
/usr/bin/python3 /nyaa/sync_es.py /nyaa/.docker/es_sync_config.json
|
||||
Reference in New Issue
Block a user