Skip to content

Commit

Permalink
Allow overriding WORKSPACE_MOUNTED. Show EXITED processes on servicep…
Browse files Browse the repository at this point in the history
…ortal
  • Loading branch information
robballantyne committed Mar 14, 2024
1 parent e00a31b commit 4016cf7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/COPY_ROOT/opt/ai-dock/bin/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function init_set_workspace() {
fi

# Determine workspace mount status
if mountpoint "$WORKSPACE" > /dev/null 2>&1; then
if mountpoint "$WORKSPACE" > /dev/null 2>&1 || [[ $WORKSPACE_MOUNTED == "true" ]]; then
export WORKSPACE_MOUNTED=true
mkdir -p "${WORKSPACE}"storage
else
Expand All @@ -231,7 +231,7 @@ function init_set_workspace() {
if [[ $WORKSPACE_MOUNTED == "true" ]]; then
test_file=${WORKSPACE}/.ai-dock-permissions-test
touch $test_file
if chown ${WORKSPACE_UID}.${WORKSPACE_GID} $test_file; then
if chown ${WORKSPACE_UID}.${WORKSPACE_GID} $test_file > /dev/null 2>&1; then
export WORKSPACE_PERMISSIONS=true
else
export WORKSPACE_PERMISSIONS=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1 id="status">Process List

{% for process in context.processes %}

{% if process.name != "serviceportal" and process.statename != "EXITED" %}
{% if process.name != "serviceportal" %}
{% if process.group == process.name %}
{% set proc_identifier = process.group %}
{% set proc_friendly_name = process.group %}
Expand Down
2 changes: 2 additions & 0 deletions build/COPY_ROOT/opt/ai-dock/storage_monitor/etc/mappings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# Key is relative to $WORKSPACE/storage/

declare -A storage_map
Expand Down
Empty file removed build/COPY_ROOT/root/.gitkeep
Empty file.
Empty file removed build/COPY_ROOT/usr/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:

volumes:
# Workspace
- ./workspace:${WORKSPACE:-/workspace}:rshared
#- ./workspace:${WORKSPACE:-/workspace}:rshared
# Will echo to root-owned authorized_keys file;
# Avoids changing local file owner
- ./config/authorized_keys:/root/.ssh/authorized_keys_mount
Expand Down

0 comments on commit 4016cf7

Please sign in to comment.