Support docker-compose
Closed this issue · 6 comments
I really like this solution.
but providing docker-compose will help more people.
version: '2'
services:
timemachine:
network_mode: "host"
environment:
- AFP_LOGIN=username
- AFP_PASSWORD=password
- AFP_NAME=servername
- AFP_SIZE_LIMIT=590000
- PUID=1000
- PGID=999
volumes:
- /media/timemachine:/timemachine
timemachine-avahi:
restart: always
network_mode: "host"
build: timemachine-avahi
Timemachine Avahi:
`FROM ubuntu:rolling
RUN apt-get update && apt-get install -y avahi-daemon avahi-utils
RUN sed -i 's%#enable-dbus=yes%enable-dbus=no%' /etc/avahi/avahi-daemon.conf
COPY ./avahi/nsswitch.conf /etc/nsswitch.conf
COPY ./avahi/afpd.service /etc/avahi/services/afpd.service
ENTRYPOINT avahi-daemon`
avahi/nsswitch.conf
'# /etc/nsswitch.conf
Example configuration of GNU Name Service Switch functionality.
If you have the glibc-doc-reference' and
info' packages installed, try:
`info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis'
avahi / afpd.service
`
I should format this in a git pull but I'm just not that organised yet, sorry!
This example works for me. Sorry about the formatting :(
This works for me:
version: '3'
services:
timemachine:
environment:
- SHARED_DIRECTORY=/nfsshare
- AFP_LOGIN=user
- AFP_PASSWORD=user
- AFP_NAME=share
- PUID=1000
- PGID=1000
- AFP_SIZE_LIMIT=
restart: unless-stopped
ports:
- "548:548"
- "636:636"
volumes:
- /media/timemachine:/timemachine
ulimits:
nofile:
soft: 65536
hard: 65536
container_name: timemachine
image: odarriba/timemachine
For me, this works :
root@Debian:/home/user/timemachine# nano ./docker-compose.yml
version: '3.7'
services:
timemachine:
image: odarriba/timemachine
restart: always
ports:
- "548:548"
- "636:636"
volumes:
- /srv/timemachine:/timemachine
- ./entrypoint.sh:/entrypoint.sh
environment:
- AFP_LOGIN=username
- AFP_PASSWORD=pwd
- AFP_NAME="TimeMachine"
- PUID=1000
- PGID=1000
- AFP_SIZE_LIMIT=
depends_on:
- avahi
avahi:
image: ianblenke/avahi
restart: always
network_mode: "host"
volumes:
- /var/run/dbus:/var/run/dbus
- /etc/avahi/services:/etc/avahi/services
root@Debian:/home/user/timemachine# nano ./entrypoint.sh
#!/bin/bash
set -e
#Repeat for all your accounts
add-account username pwd TMme /timemachine/me
#add-account USERNAME PASSWORD VOL_NAME VOL_ROOT [VOL_SIZE_MB]
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
Don't forget to copy from github : ianblenke/avahi :
/etc/avahi/services/afpd.service
What do you mean by?
Don't forget to copy from github : ianblenke/avahi :
/etc/avahi/services/afpd.service
Closing the issue, as it seems resolved :D Thanks!