mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-09-07 07:12:52 +02:00
run process in conda env directly from docker
This commit is contained in:
parent
092fc268d3
commit
d216a3739f
2 changed files with 7 additions and 5 deletions
|
@ -20,4 +20,6 @@ RUN echo "/opt/conda/envs/central_controller/lib" > /etc/ld.so.conf.d/conda-cent
|
|||
ADD ext/central-controller-docker/main-new.sh /main.sh
|
||||
RUN chmod a+x /main.sh
|
||||
|
||||
ENTRYPOINT ["/main.sh"]
|
||||
SHELL ["conda", "run", "--no-capture-output", "-n", "central_controller", "/bin/bash", "-c"]
|
||||
|
||||
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "central_controller", "/main.sh"]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
conda init
|
||||
conda activate central_controller
|
||||
# conda init
|
||||
# conda activate central_controller
|
||||
|
||||
if [ -z "$ZT_DB_HOST" ]; then
|
||||
echo '*** FAILED: ZT_DB_HOST environment variable not defined'
|
||||
|
@ -133,12 +133,12 @@ if [ -n "$DB_SERVER_CA" ]; then
|
|||
echo "secret list"
|
||||
chmod 600 /secrets/db/*.pem
|
||||
ls -l /secrets/db/
|
||||
until /opt/conda/envs/central_controller/bin/pg_isready -h ${ZT_DB_HOST} -p ${ZT_DB_PORT} -d "sslmode=prefer sslcert=${DB_CLIENT_CERT} sslkey=${DB_CLIENT_KEY} sslrootcert=${DB_SERVER_CA}"; do
|
||||
until pg_isready -h ${ZT_DB_HOST} -p ${ZT_DB_PORT} -d "sslmode=prefer sslcert=${DB_CLIENT_CERT} sslkey=${DB_CLIENT_KEY} sslrootcert=${DB_SERVER_CA}"; do
|
||||
echo "Waiting for PostgreSQL...";
|
||||
sleep 2;
|
||||
done
|
||||
else
|
||||
until /opt/conda/envs/central_controller/bin/pg_isready -h ${ZT_DB_HOST} -p ${ZT_DB_PORT}; do
|
||||
until pg_isready -h ${ZT_DB_HOST} -p ${ZT_DB_PORT}; do
|
||||
echo "Waiting for PostgreSQL...";
|
||||
sleep 2;
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue