feat: support named pipe from container to host

fix: stop failed to stop continer and default network
master
Kebler Network System Administrator 2022-10-09 22:40:49 -07:00
parent a108a88a4d
commit 16ab43f057
4 changed files with 17 additions and 5 deletions

View File

@ -1,4 +1,5 @@
version: "3.8" version: "3.8"
services: services:
code-server: code-server:
image: ghcr.io/linuxserver/code-server image: ghcr.io/linuxserver/code-server
@ -13,7 +14,12 @@ services:
volumes: volumes:
- ${Config}:/config - ${Config}:/config
- ${Files}:/config/workspace - ${Files}:/config/workspace
- ${Deploy}:/config/workspace/.deploy
ports: ports:
- ${Port}:8443 - ${Port}:8443
restart: unless-stopped restart: unless-stopped
networks:
# networks indentation moved to top level
default:
name: ${Name}

View File

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
# will user filename unless second argument is passed to make-env-file
# Name=containername # Name=containername
# USER=jim # USER=jim
# TZ=America/Los_Angles # TZ=America/Los_Angles
# Password=jimshoe # Password=jimshoe
Parent_Folder=/data # Parent_Folder=/data
Files=/data/test-files # will be /data/<name> by default #Files= # will be /files by default
Port=4321 # should be changed to avoid conflict with other containers Port=4321 # should be changed to avoid conflict with other containers

View File

@ -27,10 +27,14 @@ ename=${2:-$(basename "${1%.*}")}
__ce_Name=${Name:-$ename-files-editor} __ce_Name=${Name:-$ename-files-editor}
__ce_TZ=${TZ:-"America/Los_Angeles"} __ce_TZ=${TZ:-"America/Los_Angeles"}
__ce_Password=${Password:-password} __ce_Password=${Password:-password}
__ce_Deploy=${WEB_GENERATOR:-/opt/web-generator/deploy/$1}
if [[ ! -p $__ce_Deploy ]]; then
mkfifo $__ce_Deploy
fi
Parent_Folder=${Parent_Folder:-${HOME}/.local/share/code-edit} Parent_Folder=${Parent_Folder:-${HOME}/.local/share/code-edit}
__ce_Files=${Files:-${Parent_Folder}/$ename/files} __ce_Files=${Files:-${Parent_Folder}/$1/files}
mkdir -p ${__ce_Files} mkdir -p ${__ce_Files}
__ce_Config=${Config:-${Parent_Folder}/$ename/config} __ce_Config=${Config:-${Parent_Folder}/$1/config}
mkdir -p ${__ce_Config} mkdir -p ${__ce_Config}
__ce_Port=${Port:-8443} __ce_Port=${Port:-8443}

1
stop
View File

@ -3,4 +3,5 @@
SDIR=$(cd $(dirname $(readlink -f "$0")) >/dev/null 2>&1 ; pwd -P) SDIR=$(cd $(dirname $(readlink -f "$0")) >/dev/null 2>&1 ; pwd -P)
env_file=$SDIR/editors/docker.${1}.env env_file=$SDIR/editors/docker.${1}.env
[[ ! -f $env_file ]] && $($SDIR/make-env-file $1) [[ ! -f $env_file ]] && $($SDIR/make-env-file $1)
docker container stop $1-files-editor
docker-compose --env-file $SDIR/editors/docker.${1}.env down docker-compose --env-file $SDIR/editors/docker.${1}.env down