From 1d3ac5c2e0f65ec9c00dcc6290e1de2f84d25f04 Mon Sep 17 00:00:00 2001 From: "DESKTOP-72TV0V4\\caoxiaozhu" Date: Sat, 9 May 2026 12:58:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20docker-compose=20=E6=B7=BB=E5=8A=A0=20v?= =?UTF-8?q?olumes=20=E6=98=A0=E5=B0=84=E5=92=8C=20SSH=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=BF=9B=E5=85=A5=20/app=20=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 83c5b2f..a140403 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,8 @@ services: - "${WEB_PORT:-5173}:${WEB_PORT:-5173}" - "${SERVER_PORT:-8000}:${SERVER_PORT:-8000}" - "2223:22" + volumes: + - .:/app working_dir: /app command: - /bin/sh @@ -27,8 +29,14 @@ services: DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3 python3-pip python3-venv && mkdir -p /run/sshd && /usr/sbin/sshd && + printf '%s\n' 'cd /app >/dev/null 2>&1 || true' > /etc/profile.d/zz-x-financial-app-dir.sh && + chmod 644 /etc/profile.d/zz-x-financial-app-dir.sh && + touch /root/.bashrc /root/.profile && + if ! grep -qxF 'cd /app >/dev/null 2>&1 || true' /root/.bashrc; then printf '\ncd /app >/dev/null 2>&1 || true\n' >> /root/.bashrc; fi && + if ! grep -qxF 'cd /app >/dev/null 2>&1 || true' /root/.profile; then printf '\ncd /app >/dev/null 2>&1 || true\n' >> /root/.profile; fi && sed -i 's/\r$//' /app/start.sh /app/web/web_start.sh /app/server/server_start.sh && chmod +x /app/start.sh /app/web/web_start.sh /app/server/server_start.sh && + cd /app && ./start.sh all healthcheck: test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:${WEB_PORT:-5173}/ >/dev/null || exit 1"]