docker-containers/samba.yml
2023-04-04 17:05:31 +08:00

46 lines
868 B
YAML

version: '3.8'
services:
samba:
image: dperson/samba
restart: always
networks:
samba_net:
ipv4_address: 10.1.0.20
volumes:
- /opt/samba:/mnt/share:rw
command: >
-s "public;/mnt/share;yes;no;yes;all"
-p
tmpfs:
- /tmp
environment:
TZ: "Asia/Irkutsk"
USERID: "1000"
GROUPID: "1000"
ANON: "yes"
ANON_UID: "65534"
ANON_GID: "65534"
ports:
- "137:137/udp"
- "138:138/udp"
- "139:139/tcp"
- "445:445/tcp"
deploy:
resources:
limits:
cpus: '0.5'
memory: '512M'
placement:
constraints: [node.role == worker]
networks:
samba_net:
driver: macvlan
driver_opts:
parent: enp3s0
ipam:
driver: default
config:
- subnet: 10.1.0.0/21
gateway: 10.1.0.1