1
0

feat:添加samba到列表

This commit is contained in:
okxlin
2024-06-03 00:08:37 +08:00
parent c4fc613ae7
commit 7e2e91f2b4
13 changed files with 321 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
CONTAINER_NAME="samba"
DATA_PATH="./data"
HOSTNAME="samba"
INTERNAL_DATA_PATH="/share/data"
PANEL_APP_PORT_HTTP="139"
PANEL_APP_PORT_SMB="445"
SHARE_1="SmbShare:/share/folder:rw:pirate"
SHARE_2=""
SHARE_3=""
TZ="Asia/Shanghai"
USER_1="1000:1000:pirate:pirate:put-any-password-here"
USER_2=""
USER_3=""

View File

@@ -0,0 +1,89 @@
additionalProperties:
formFields:
- default: 139
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: 445
edit: true
envKey: PANEL_APP_PORT_SMB
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: "samba"
edit: true
envKey: HOSTNAME
labelEn: Hostname
labelZh: 主机名
required: true
type: text
- default: "Asia/Shanghai"
edit: true
envKey: TZ
labelEn: Time Zone
labelZh: 时区
required: true
type: text
- default: "./data"
edit: true
envKey: DATA_PATH
labelEn: External Data Path
labelZh: 外部数据路径
required: true
type: text
- default: "/share/data"
edit: true
envKey: INTERNAL_DATA_PATH
labelEn: Internal container data paths
labelZh: 容器内部数据路径
required: true
type: text
- default: "1000:1000:pirate:pirate:put-any-password-here"
edit: true
envKey: USER_1
labelEn: User 1
labelZh: 用户 1
required: true
type: text
- default: "SmbShare:/share/folder:rw:pirate"
edit: true
envKey: SHARE_1
labelEn: Share 1
labelZh: 共享 1
required: true
type: text
- default: ""
edit: true
envKey: USER_2
labelEn: User 2 (Edit to remove comments in compose.yml to take effect)
labelZh: 用户 2 (编辑去除compose.yml里的注释生效)
required: false
type: text
- default: ""
edit: true
envKey: SHARE_2
labelEn: Share 2 (Edit to remove comments in compose.yml to take effect)
labelZh: 共享 2 (编辑去除compose.yml里的注释生效)
required: false
type: text
- default: ""
edit: true
envKey: USER_3
labelEn: User 3 (Edit to remove comments in compose.yml to take effect)
labelZh: 用户 3 (编辑去除compose.yml里的注释生效)
required: false
type: text
- default: ""
edit: true
envKey: SHARE_3
labelEn: Share 3 (Edit to remove comments in compose.yml to take effect)
labelZh: 共享 3 (编辑去除compose.yml里的注释生效)
required: false
type: text

View File

View File

@@ -0,0 +1,29 @@
services:
samba:
image: "elswork/samba:latest"
container_name: ${CONTAINER_NAME}
hostname: ${HOSTNAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:139"
- "${PANEL_APP_PORT_SMB}:445"
environment:
- TZ=${TZ}
volumes:
- "${DATA_PATH}:${INTERNAL_DATA_PATH}"
command:
-u "${USER_1}"
-s "${SHARE_1}"
#-u "${USER_2}"
#-s "${SHARE_2}"
#-u "${USER_3}"
#-s "${SHARE_3}"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

View File

@@ -0,0 +1,3 @@
#!/bin/bash
chown -R 1000:1000 data