forked from ServerContainers/samba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (45 loc) · 2.53 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '3'
# docker-compose.yml example for https://github.com/ServerContainers/samba
services:
samba:
build: .
image: ghcr.io/servercontainers/samba
restart: always
network_mode: host
# uncomment to solve bug: https://github.com/ServerContainers/samba/issues/50 - wsdd2 only - not needed for samba
#cap_add:
# - CAP_NET_ADMIN
environment:
MODEL: 'TimeCapsule'
AVAHI_NAME: StorageServer
SAMBA_CONF_LOG_LEVEL: 3
# uncomment to disable optional services
#WSDD2_DISABLE: 1
#AVAHI_DISABLE: 1
GROUP_family: 1500
ACCOUNT_alice: alipass
UID_alice: 1000
GROUPS_alice: family
ACCOUNT_bob: bobpass
UID_bob: 1001
GROUPS_bob: family
# example for hashed password (user: foo | password: bar) - generated using create-hash.sh script.
ACCOUNT_foo: "foo:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:86C156FC198B358CCCF6278D8BD49B6A:[U ]:LCT-61B0859A:"
UID_foo: 1002
GROUPS_foo: family
SAMBA_VOLUME_CONFIG_shared_home: "[Home]; path=/shares/homes/%U; valid users = alice, bob, foo; guest ok = no; read only = no; browseable = yes"
SAMBA_VOLUME_CONFIG_aliceonly: "[Alice Share]; path=/shares/alice; valid users = alice; guest ok = no; read only = no; browseable = yes"
SAMBA_VOLUME_CONFIG_alicehidden: "[Alice Hidden Share]; path=/shares/alice-hidden; valid users = alice; guest ok = no; read only = no; browseable = no"
SAMBA_VOLUME_CONFIG_bobonly: "[Bob Share]; path=/shares/bob; valid users = bob; guest ok = no; read only = no; browseable = yes"
SAMBA_VOLUME_CONFIG_public: "[Public]; path=/shares/public; valid users = alice, bob, foo; guest ok = no; read only = no; browseable = yes; force group = family"
SAMBA_VOLUME_CONFIG_public_ro: "[Public ReadOnly]; path=/shares/public; guest ok = yes; read only = yes; browseable = yes; force group = family"
SAMBA_VOLUME_CONFIG_timemachine: "[TimeMachine]; path=/shares/timemachine/%U; valid users = alice, bob, foo; guest ok = no; read only = no; browseable = yes; fruit:time machine = yes; fruit:time machine max size = 500G"
volumes:
- /etc/avahi/services/:/external/avahi
# avoid loops when mounting folders to /shares (I'd recommend explicit mapping for each share)
- ./shares/alice:/shares/alice
- ./shares/alice-hidden:/shares/alice-hidden
- ./shares/bob:/shares/bob
- ./shares/public:/shares/public
- ./shares/homes:/shares/homes
- ./shares/timemachine:/shares/timemachine