Coder Social home page Coder Social logo

docker-snapdrop's Issues

[BUG] <real_ip settings>

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hi, from the discord chat i am opening an issue here as requested
"hi, i want to ask for snapdrop it says on the guide "If you intend to expose Snapdrop to the internet, edit /config/nginx/site-confs/default.conf and uncomment the real_ip settings" but when i go to this file, it doesn't have anything with real_ip in it. I run it on ubuntu 22.10 with docker compose on portainer if that matters, is it in another file?"

Kind regards,
George

Expected Behavior

To isolate the site to local sharing and not internet sharing

Steps To Reproduce

Install docker compose
Install portainer
Deploy snapdrop as docker compose
make a domain in NPM and make it FQDN
visit that url from various locations and you will see all devices connected there instead of the local ones

Environment

- OS: Ubuntu 22.10 server
- How docker service was installed:
curl -fsSL https://get.docker.com/ -o get-docker.sh
chmod +x get-docker.sh
sh get-docker.sh

CPU architecture

x86-64

Docker creation

version: "2.1"
services:
  snapdrop:
    image: lscr.io/linuxserver/snapdrop:latest
    container_name: snapdrop
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Athens
    volumes:
      - /opt/snapdrop:/config
    restart: unless-stopped

Container logs

Logo
Home
local

Dashboard
App Templates

Stacks
Containers
Images
Networks
Volumes
Events
Host

Settings
Users

Environments

Registries
Licenses
Authentication logs

Notifications
Settings

©
Portainer Business Edition
2.17.0
Containers>snapdrop>Logs
Container logs


admin
Logs
Search...

Filter search results
Auto refresh
Fetch

All logs
Lines
1000

Show timestamp

Show line numbers

Wrap line
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    1000
User gid:    1000
-------------------------------------
Setting resolver to  127.0.0.11
Setting worker_processes to 4
generating self-signed keys in /config/keys, you can replace these with your own keys if required
..........+........+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...........+.....+......+.+...+.....+.+.....+.+......+..+...+.......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+.......................+.+..................+..+........................+.........+................+.....+............+....+...+.....+............+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...+.........+..+....+.....+.........+.+.....+...+.+.................+...+....+..+.+............+.................+...+......+.......+...+..+.......+...+..+.+...........+.............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+...+.....+...+...+....+..+...+......+......+...+.......+...+..+.............+......+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+...+..+...+.+.....+.+..............+.+...+......+...........+....+..+....+...+.................+......+.........+.+.................+..................+....+...+...........+.+........+.......+.....+.........+......+.+.....+............+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
[custom-init] No custom files found, skipping...

[BUG] nginx socket() fails when ipv6 disabled

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running the docker container when ipv6 is disabled by the kernel gives: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol).

Specifically ipv6 was disabled by sudo grubby --args=ipv6.disable=1 --update-kernel=ALL on Fedora 39.

Expected Behavior

It should work just like when ipv6 is enabled.

Steps To Reproduce

  1. Disable ipv6 via sudo grubby --args=ipv6.disable=1 --update-kernel=ALL on Fedora 39 and in docker daemon via {"ipv6": false} in /etc/docker/daemon.json then reboot
  2. docker compose up snapdrop given the compose file below

Environment

- OS: Fedora 39
- How docker service was installed: sudo dnf install docker

CPU architecture

x86-64

Docker creation

From my docker-compose.yml:

  snapdrop:
    image: "lscr.io/linuxserver/snapdrop:latest"
    container_name: "snapdrop"
    restart: always
    ports:
      - 1180:80
    environment:
      - PUID=${SNAPDROP_UID}
      - PGID=${SNAPDROP_GID}
      - TZ=${USER_TZ}
    volumes:
      - ${CONFIG}/snapdrop:/config

Where ${CONFIG}/snapdrop is a valid path on my host system

Container logs

$ docker compose up snapdrop
[+] Running 1/0
 ✔ Container snapdrop  Created                                                                                       0.0s
Attaching to snapdrop
snapdrop  | [migrations] started
snapdrop  | [migrations] 01-nginx-site-confs-default: skipped
snapdrop  | [migrations] 02-default-location: skipped
snapdrop  | [migrations] done
snapdrop  | usermod: no changes
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  |       ██╗     ███████╗██╗ ██████╗
snapdrop  |       ██║     ██╔════╝██║██╔═══██╗
snapdrop  |       ██║     ███████╗██║██║   ██║
snapdrop  |       ██║     ╚════██║██║██║   ██║
snapdrop  |       ███████╗███████║██║╚██████╔╝
snapdrop  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
snapdrop  |
snapdrop  |    Brought to you by linuxserver.io
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  | To support LSIO projects visit:
snapdrop  | https://www.linuxserver.io/donate/
snapdrop  |
snapdrop  | ───────────────────────────────────────
snapdrop  | GID/UID
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  | User UID:    1006
snapdrop  | User GID:    1006
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  | using keys found in /config/keys
snapdrop  | [custom-init] No custom files found, skipping...
snapdrop  | [ls.io-init] done.
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | Snapdrop is running on port 3000
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

[BUG] php-fpm is not required

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

the php-fpm is up with the container.

Expected Behavior

drop the php-fpm service.

Steps To Reproduce

  1. docker-compose.yml
    ---
    version: "2.1"
    services:
      snapdrop:
        image: lscr.io/linuxserver/snapdrop:latest
        container_name: snapdrop
        restart: always
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=Etc/UTC
  1. docker compose up -d
  2. docker compose exec snapdrop ps -aux

Environment

No response

CPU architecture

arm64

Docker creation

---
      version: "2.1"
      services:
        snapdrop:
          image: lscr.io/linuxserver/snapdrop:latest
          container_name: snapdrop
          restart: always
          environment:
            - PUID=1000
            - PGID=1000
            - TZ=Etc/UTC

Container logs

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.1  0.0    200    64 ?        Ss   06:24   0:00 /package/admi
root          15  0.0  0.0    204    68 ?        S    06:24   0:00 s6-supervise 
root          17  0.0  0.0    192     4 ?        Ss   06:24   0:00 /package/admi
root          38  0.0  0.0    204    68 ?        S    06:24   0:00 s6-supervise 
root          39  0.0  0.0    204    68 ?        S    06:24   0:00 s6-supervise 
root          40  0.0  0.0    204    64 ?        S    06:24   0:00 s6-supervise 
root          41  0.0  0.0    204    64 ?        S    06:24   0:00 s6-supervise 
root          42  0.0  0.0    204    68 ?        S    06:24   0:00 s6-supervise 
root          43  0.0  0.0    204    68 ?        S    06:24   0:00 s6-supervise 
root          51  0.0  0.0    180    48 ?        Ss   06:24   0:00 /package/admi
abc          235  2.0  0.2 243780 49760 ?        Ssl  06:24   0:00 /usr/bin/node
root         236  0.2  0.0  33732 14796 ?        Ss   06:24   0:00 php-fpm: mast
root         239  0.0  0.0   1692   984 ?        Ss   06:24   0:00 /usr/sbin/cro
root         241  0.1  0.0  18100  6328 ?        Ss   06:24   0:00 nginx: master
abc          251  0.0  0.0  18548  2608 ?        S    06:24   0:00 nginx: worker
abc          252  0.0  0.0  18548  2608 ?        S    06:24   0:00 nginx: worker
abc          253  0.0  0.0  18548  2608 ?        S    06:24   0:00 nginx: worker
abc          254  0.0  0.0  18548  2236 ?        S    06:24   0:00 nginx: worker
abc          265  0.0  0.0  33740  3504 ?        S    06:24   0:00 php-fpm: pool
abc          266  0.0  0.0  33740  3504 ?        S    06:24   0:00 php-fpm: pool
root         277 33.3  0.0   3200  2280 pts/0    Rs+  06:24   0:00 ps -aux

additional settings for nginx reverse proxy

to get the program working stable you need some settings for a (nginx) reverse proxy. maybe they are usefull for other users.

proxy_pass http://localhost:port;          # adjust ip instead of localhost and port
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-for $remote_addr;

Can't see other devices within subnet using provided docker-compose yml snippet

linuxserver.io


Expected Behavior

Be able to define specific external ports for the container and have devices be able to see each other when they have navigated to the snapdrop page.

Current Behavior

Have never been able to see another device. I originally pulled this back at the beginning of 2021. The logs below are from the latest container pull after clearing the contents of the '/config' data locally. It doesn't matter if devices are both wired, wireless, or any combination thereof. There is absolutely nothing unusual or unique about the basic home network I'm trying to use this on. As others have noted, I can open a second browser or tab on the same host and see the additional 'device name' there and successfully send a file to the other instance of that device.

Also reported in discord here and a few other places: https://discord.com/channels/354974912613449730/506925392603512839/925594810075738134

Steps to Reproduce

  1. Install docker-ce, docker-compose, and all reqs as documented by official docker documentation
  2. Use the compose snippet documented by this repo within its readme.md
  3. Pull image and bring up container
  4. Navigate to the defined http or https port at the external IP of the armv7l device running the container. (In my case this is 192.168.1.2)
  5. snapdrop page should load fine and tell the user what its given "device name" is but no other devices are seen.

Environment

OS: Raspberry Pi OS (uname -a: Linux raspberrypi 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux)
CPU architecture: arm32
How docker service was installed: From the official repo, following the official instructions. Currently installed version of docker-ce: 5:20.10.123-0raspbian-buster

Command used to create docker container (run/create/compose/screenshot)

Using the same compose output as described in the readme.md save for my own port mapping:

  snapdrop:
    image: ghcr.io/linuxserver/snapdrop
    container_name: snapdrop
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
    volumes:
      - /mnt/storage/docker/appdata/snapdrop:/config
    ports:
      - 8091:80
      - 8092:443
    restart: unless-stopped

Docker logs

pi@raspberrypi:~ $ docker logs snapdrop
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
........................+++++
...+++++
writing new private key to '/config/keys/cert.key'
-----
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
[cont-init.d] 50-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Snapdrop is running on port 3000
pi@raspberrypi:~ $

Upgrade Required - nginx

I get the following error now:

_Upgrade Required!

The application inside this image has been moved to a new folder.

You will need to update your /config/nginx/nginx.conf and /config/nginx/site-confs/default.conf in order for the application to work.

New config samples are located at /config/nginx/nginx.conf.sample and /config/nginx/site-confs/default.conf.sample

Please review our announcement: Significant changes to nginx based images_

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.