1

Add examples, update README and LICENSE

This commit is contained in:
2020-04-18 19:37:57 +04:00
parent 386e63be60
commit 962674edb1
6 changed files with 178 additions and 1 deletions

View File

@@ -0,0 +1,70 @@
version: "3.7"
networks:
host:
external: true
name: host
volumes:
avahicfg:
name: avahicfg
driver: local
driver_opts:
type: none
device: ./avahi
o: bind,ro
sambacfg:
name: sambacfg
driver: local
driver_opts:
type: none
device: ./samba
o: bind,ro
sambadb:
name: sambadb
driver: local
driver_opts:
type: none
device: ./sambalib
o: bind
storage:
name: storage
driver: local
driver_opts:
type: none
device: ./data
o: bind
services:
samba:
image: fat0troll/samba-with-avahi:latest
env_file:
- ./env
deploy:
replicas: 1
resources:
limits:
memory: 512M
reservations:
memory: 512M
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
networks:
- host
tty: true
volumes:
- type: volume
source: storage
target: /data
- type: volume
source: avahicfg
target: /etc/avahi
- type: volume
source: sambacfg
target: /etc/samba
- type: volume
source: sambadb
target: /var/lib/samba

3
examples/env Normal file
View File

@@ -0,0 +1,3 @@
USER0=fat0troll,users,1000
USER1=pztrn,users,1001
USER2=whatever,users,1002

33
examples/samba/smb.conf Normal file
View File

@@ -0,0 +1,33 @@
[global]
netbios name = dockerhost
interfaces = 192.168.0.1/24
bind interfaces only = yes
server string = DOCKERHOST
workgroup = WORKGROUP
guest account = guest
passdb backend = tdbsam
security = user
map to guest = bad user
guest ok = yes
timestamp logs = no
preserve case = yes
short preserve case = yes
log level = 3
smb encrypt = disabled
fruit:aapl = yes
fruit:resource = xattr
[timemachine]
path = /data/timemachine
browseable = yes
read only = no
guest ok = no
ea support = yes
inherit acls = yes
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
fruit:time machine max size = 1024 G
fruit:advertise_fullsync = true
spotlight = yes
veto files = /.apdisk/.DS_Store/.TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/Temporary Items/Thumbs.db/
delete veto files = yes