• 23 Posts
  • 64 Comments
Joined 2 years ago
cake
Cake day: February 17th, 2024

help-circle








  • Interestingly, I did something similar with Linkwarden where I installed the datasets in /home/user/linkwarden/data. The dam thing caused my VM to run out of space because it started downloading pages for the 4000 bookmarks I had. It went into crisis mode so I stopped it. I then created a dataset on my Truenas Scale machine and NFS exported to the VM on the same server. I simply cp -R to the new NFS mountpoint, edited the yml file with the new paths and voila! It seems to be working. I know that some docker container don’t like working off NFS share so we’ll see. I wonder ho well this will work when the VM is on a different machine as the there is a network cable, a switch, etc. in between. If for any reason the nas goes down, the docker containers on the Proxmox VM will be crying as they’ll lose the link to their volumes? Can anything be done about this? I guess it can never be as risilient as having VM and has on the same machine.



  • The first rule of containers is that you do not store any data in containers.

    Do you mean they should be bind mounts? From here, a bind mount should look like this:

    version: ‘3.8’

    services: my_container: image: my_image:latest volumes: - /path/on/host:/path/in/container

    So referring to my Firefly compose above, then I shoudl simply be able to copy over the /var/www/html/storage/upload for the main app data and the database stored in here /var/lib/mysql can just be copied over? but then why does my local folder not have any strorage/upload folders?

    user@vm101:/var/www/html$ ls index.html


  • Here is my docker compose file below. I think I used the standard file that the developer ships, simply because I was keen to get firefly going without fully understanding the complexity of docker storage in volumes.

     The Firefly III Data Importer will ask you for the Firefly III URL and a "Client ID".
    # You can generate the Client ID at http://localhost/profile (after registering)
    # The Firefly III URL is: http://app:8080/
    #
    # Other URL's will give 500 | Server Error
    #
    
    services:
      app:
        image: fireflyiii/core:latest
        hostname: app
        container_name: firefly_iii_core
        networks:
          - firefly_iii
        restart: always
        volumes:
          - firefly_iii_upload:/var/www/html/storage/upload
        env_file: .env
        ports:
          - '84:8080'
        depends_on:
          - db
      db:
        image: mariadb:lts
        hostname: db
        container_name: firefly_iii_db
        networks:
          - firefly_iii
        restart: always
        env_file: .db.env
        volumes:
          - firefly_iii_db:/var/lib/mysql
    
      importer:
        image: fireflyiii/data-importer:latest
        hostname: importer
        restart: always
        container_name: firefly_iii_importer
        networks:
          - firefly_iii
        ports:
          - '81:8080'
        depends_on:
          - app
        env_file: .importer.env
    
      cron:
        #
        # To make this work, set STATIC_CRON_TOKEN in your .env file or as an environment variable and replace REPLACEME below
        # The STATIC_CRON_TOKEN must be *exactly* 32 characters long
        #
        image: alpine
        container_name: firefly_iii_cron
        restart: always
        command: sh -c "echo \"0 3 * * * wget -qO- http://app:8080/api/v1/cron/XTrhfJh9crQGfGst0OxoU7BCRD9VepYb;echo/" | crontab - && crond -f -L /dev/stdout"
        networks:
          - firefly_iii
    volumes:
       firefly_iii_upload:
       firefly_iii_db:
    
    networks:
      firefly_iii:
        driver: bridge