question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: How to run AB on localhost but store data on NAS?

See original GitHub issue

Hello!

I’m using docker-compose. Following the title if this issue: I first tried changing the whole data dir to a mounted path pointing to my NAS, but I got this error:

  archivebox_1  | [X] OSError: Failed to write /data/ArchiveBox.conf with fcntl.F_FULLFSYNC. ([Errno 22] Invalid argument)
  archivebox_1  |     You can store the archive/ subfolder on a hard drive or network share that doesn't support support syncronous writes,
  archivebox_1  |     but the main folder containing the index.sqlite3 and ArchiveBox.conf files must be on a filesystem that supports FSYNC.

I cannot figure out how to separate data/archive/ from the rest as I wish to store this on my NAS. I tried symlinking it but it just complains that data/archive/ already exists.

I would prefer to have as much data on my NAS so all or any of data/{logs,sonic,sources}/ as well.

How do I setup this with docker-compose?

Thank you kindly! in advance.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
cmuenchcommented, Dec 10, 2021

@iwconfig I was able to share my archive directory on my Synology NAS. I mouted the archive directory directly from NFS.

version: '2.4'

services:
    archivebox:        
        image: ${DOCKER_IMAGE:-archivebox/archivebox:master}
        command: server --quick-init 0.0.0.0:8000
        restart: unless-stopped
        environment:
            - ALLOWED_HOSTS=*
            - MEDIA_MAX_SIZE=750m
        volumes:
            - ./volumes/data:/data
            - archivebox-archive:/data/archive

volumes:
  archivebox-archive:
      driver: local
      driver_opts:
        type: "nfs"
        o: "nfsvers=4,addr=192.168.1.12,rw"
        device: ":/volume1/archivebox/archive"

Difference is that I used docker to create the mount instead of fstab. Hope that also works on your side.

1reaction
iwconfigcommented, Dec 10, 2021

Thank you so much! I got it working now 😃 I just had one issue with permissions inside the docker container, so I had to do

docker exec -it archivebox_archivebox_1 chmod -R 777 /data/archive

Awesome! Again, thank you!

@pirate Maybe this should be mentioned in the documentation? If it already is, I’m sorry, I haven’t seen it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there be a difference between ab testing on localhost and ...
So I would recommend running ab from another host in your intranet, this way you will be able to get more clear results...
Read more >
Synology NAS Server – Inspecting L(E)AMP stack ...
In a Synology NAS server, the Nginx instance runs with the config files it finds under /etc/nginx : ? user01@nas01:~$ ls -al /etc ......
Read more >
Installing the Unifi Controller on a Synology Nas in 5 minutes
[Step-by-Step] Installing the Unifi Controller on a Synology NAS with the use of Docker. Up and running in 5 minutes.
Read more >
New Nas Cannot access MariaDB 10 - QNAP Forum
Recently got myself a 253D. now running FW 5.0.0.1850 installed MariaDB 10 v1.0.1.235 and phpmyadmin v4.9.7.0 using the app centre. gives me
Read more >
Enabling SSL in MariaDB running on Synology NAS
Please, check the following configuration files and variables: File: /etc/mysql/my.cnf [client] ... ssl-ca=/var/lib/mysql/ca.pem ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found