newapi / start.sh
ohmyapi's picture
Fix: correct binary path and log directory
d1451b5
raw
history blame contribute delete
431 Bytes
#!/bin/bash
set -e
# Start Redis in background
redis-server --daemonize yes \
--maxmemory 64mb \
--maxmemory-policy allkeys-lru \
--bind 127.0.0.1 \
--port 6379 \
--save "" \
--appendonly no
# Wait for Redis
for i in $(seq 1 10); do
redis-cli ping >/dev/null 2>&1 && break
sleep 0.5
done
# Set Redis connection
export REDIS_CONN_STRING="redis://127.0.0.1:6379"
# Start new-api
exec /new-api --log-dir /tmp/logs