71 lines
1.3 KiB
YAML
71 lines
1.3 KiB
YAML
version: '3.7'
|
|
|
|
x-logging: &json-log
|
|
driver: 'json-file'
|
|
options:
|
|
max-size: 20m
|
|
max-file: '5'
|
|
|
|
networks:
|
|
backend:
|
|
driver: overlay
|
|
attachable: true
|
|
driver_opts:
|
|
encrypted: "true"
|
|
|
|
volumes:
|
|
ssh-config:
|
|
|
|
secrets:
|
|
pubkey:
|
|
file: ./keys/public.pub
|
|
|
|
services:
|
|
sftp:
|
|
image: atmoz/sftp
|
|
deploy:
|
|
replicas: 1
|
|
resources:
|
|
limits:
|
|
cpus: '0.2'
|
|
memory: '100M'
|
|
restart_policy:
|
|
condition: any
|
|
update_config:
|
|
parallelism: 1
|
|
delay: 5s
|
|
order: stop-first
|
|
failure_action: rollback
|
|
placement:
|
|
constraints: [node.hostname == nbg-4]
|
|
logging: *json-log
|
|
ports:
|
|
- '2112:22'
|
|
volumes:
|
|
- '/mnt/backups:/home/backups'
|
|
- 'ssh-config:/etc/ssh:rw'
|
|
secrets:
|
|
- source: pubkey
|
|
target: /home/backups/.ssh/keys/sftp-publickey.pub
|
|
command: backups::1002:1002:data
|
|
# samba:
|
|
# image: localhost:5000/samba:latest
|
|
# deploy:
|
|
# restart_policy:
|
|
# condition: any
|
|
# update_config:
|
|
# parallelism: 2
|
|
# delay: 5s
|
|
# order: start-first
|
|
# failure_action: rollback
|
|
# placement:
|
|
# constraints: [node.hostname == nbg-4]
|
|
# volumes:
|
|
# - '/mnt/db_storage/samba:/var/lib/samba:rw'
|
|
# logging: *json-log
|
|
# ports:
|
|
# - '445:445'
|
|
# - '139:139'
|
|
# networks:
|
|
# - backend
|