Infrastructure and add removeListNeedsHelp to users

This commit is contained in:
2026-02-09 17:56:05 -05:00
parent be3ee9096b
commit 63b19cb78a
9 changed files with 43 additions and 19 deletions
+13 -4
View File
@@ -6,10 +6,18 @@ pwd_dirname=$(basename $(pwd));
script_dirname="drb_counter";
arch=$(uname)
environment="${1:-production}"
if [ "$pwd_dirname" == "$script_dirname" ]; then
echo "PWD DIRNAME: "$pwd_dirname;
echo "You must run this script from the project's root dir (../) for the Dockerfile to have access to the configs to COPY";
exit 1;
# Check for sanity, was debugging database mismatch
if [ "$#" -lt 1 ]; then
nodename=$(uname -n)
known_development_machines=("fedorasahi" "blackview")
for item in "${known_development_machines[@]}"; do
if [[ "$item" == "$nodename" ]]; then
echo "Stupid Error: You are on a known development device: $nodename. As a developer, always explicitly supply the environment as the first argument" >&2
echo "Usage: ./drb_counter/rebuild-docker.sh development"
exit 1
fi
done
fi
# 2. stop and remove all running/existing containers
@@ -31,6 +39,7 @@ if [ $arch == "Darwin" ]; then
else
# docker run --network=host --env DRB_ENV=production --env COUCHDB_ADMIN_PASSWORD=$COUCHDB_ADMIN_PASSWORD --add-host=host.docker.internal:host-gateway --restart unless-stopped --detach --name=mozo_drb_counter mozo_drb_counter
docker run --network=host --env DRB_ENV=$environment --env COUCHDB_ADMIN_PASSWORD=$COUCHDB_ADMIN_PASSWORD --restart unless-stopped --detach --name=mozo_drb_counter mozo_drb_counter
#docker run -p 9022:9022 --env DRB_ENV=$environment --env COUCHDB_ADMIN_PASSWORD=$COUCHDB_ADMIN_PASSWORD --restart unless-stopped --detach --name=mozo_drb_counter mozo_drb_counter
fi
# To just start the container created through al these steps without rebuilding them: