Fixes and add label to tables
This commit is contained in:
@@ -72,6 +72,7 @@ class InMemoryQCounter
|
||||
#couch_settings = YAML.load_file(couch_settings_path)[environment]
|
||||
couch_settings = YAML.safe_load(ERB.new(File.read(couch_settings_path)).result, [Symbol], [], ['default'])[environment]
|
||||
database = couch_settings['database'].sub 'localhost', 'host.docker.internal'
|
||||
#database = couch_settings['database']
|
||||
#database = couch_settings['database'].sub 'localhost', '172.17.0.1'
|
||||
db = CouchRest.database(database) # for debug: db = CouchPotato.database.couchrest_database
|
||||
design_doc = "_design/order_counter"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# 1. ensure this script is run from the project's root, not the drb_counter directory
|
||||
pwd_dirname=$(basename $(pwd));
|
||||
script_dirname="drb_counter";
|
||||
arch=$(uname)
|
||||
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";
|
||||
@@ -23,7 +24,12 @@ docker build -f drb_counter/Dockerfile -t mozo_drb_counter .
|
||||
# docker run --network=host --env DRB_ENV=production --env COUCHDB_ADMIN_PASSWORD=$COUCHDB_ADMIN_PASSWORD -t -i --rm mozo_drb_counter bash
|
||||
|
||||
# 5. Spin up the counter container from the generated image
|
||||
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
|
||||
if [ $arch == "Darwin" ]; then
|
||||
echo "Running the created image using the Mac Darwin port exposing"
|
||||
docker run -p 9022:9022 --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
|
||||
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
|
||||
fi
|
||||
|
||||
# To just start the container created through al these steps without rebuilding them:
|
||||
# docker container start $(docker ps -a -q --filter ancestor=mozo_drb_counter)
|
||||
|
||||
Reference in New Issue
Block a user