SOLVED. Has anyone installed Shotshare using docker-compose ?

Ok so the solution was this. Thank you @mouse

cd /home

git clone https://github.com/mdshack/shotshare

cd …/Files/

sudo mkdir Shotshare

cd …/Files/Shotshare

sudo mkdir shotshare_data

sudo touch .env database.sqlite

cp -r /home/shotshare/storage/* …/Files/Shotshare/shotshare_data

chown 82:82 -R …/Files/Shotshare/


<span style="color:#323232;">version: "3.3"
</span><span style="color:#323232;">services:
</span><span style="color:#323232;">  shotshare:
</span><span style="color:#323232;">    ports:
</span><span style="color:#323232;">      - 2000:80
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - HOST=:80
</span><span style="color:#323232;">      - ALLOW_REGISTRATION=false
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - .../Files/Shotshare/shotshare_data:/app/storage
</span><span style="color:#323232;">      - .../Files/Shotshare/database.sqlite:/app/database/database.sqlite
</span><span style="color:#323232;">      - .../Files/Shotshare/.env:/app/.env
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    container_name: shotshare
</span><span style="color:#323232;">    image: mdshack/shotshare:latest
</span><span style="color:#323232;">networks: {}
</span>

Hello everyone.

I am deeply struggling to install shotshare on my server using docker-compose.

I followed the instructions and I’ve been talking with someone (from their team I guess) for 2 weeks without finding a solution.

Does anyone have a working docker-compose to share so I can compare it and understand ?

Tiritibambix,
@Tiritibambix@lemmy.ml avatar

To give more information:

I’m a portainer user and wanted to try shotshare as is looks exactly like what I need :)

I followed these steps: sudo mkdir Shotshare and cd into this directory sudo touch .env database.sqlite sudo chown 82:82 .env database.sqlite

and then tried this docker-compose:


<span style="color:#323232;">version: "3.3"
</span><span style="color:#323232;">services:
</span><span style="color:#323232;">  shotshare:
</span><span style="color:#323232;">    ports:
</span><span style="color:#323232;">      - 2000:2000
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - HOST=:2000
</span><span style="color:#323232;">      - ALLOW_REGISTRATION=false
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/shotshare_data:/app/storage
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/database.sqlite:/app/database/database.sqlite
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/.env:/app/.env
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    container_name: shotshare
</span><span style="color:#323232;">    image: mdshack/shotshare:latest
</span><span style="color:#323232;">networks: {}
</span>
JASN_DE,

Where does it fail?

Tiritibambix,
@Tiritibambix@lemmy.ml avatar

I struggled a lot with ports.

I still didn’t get how ports are configured in the container, but a user tried to help me and now I get an error 500

Here’s my compose (path is OMV path)


<span style="color:#323232;">version: "3.3"
</span><span style="color:#323232;">services:
</span><span style="color:#323232;">  shotshare:
</span><span style="color:#323232;">    ports:
</span><span style="color:#323232;">      - 2000:2000
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - HOST=:2000
</span><span style="color:#323232;">      - ALLOW_REGISTRATION=false
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/shotshare_data:/app/storage
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/database.sqlite:/app/database/database.sqlite
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/.env:/app/.env
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    container_name: shotshare
</span><span style="color:#323232;">    image: mdshack/shotshare:latest
</span><span style="color:#323232;">networks: {}
</span>

image


<span style="color:#323232;">ERR | ts=1705936180.7673454 logger=http.log.access msg=handled request request={"remote_ip":"192.168.1.106","remote_port":"57659","client_ip":"192.168.1.106","proto":"HTTP/1.1","method":"GET","host":"192.168.1.104:2000","uri":"/","headers":{"Dnt":["1"],"Sec-Gpc":["1"],"Connection":["keep-alive"],"Upgrade-Insecure-Requests":["1"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"],"Accept-Language":["en-US,en;q=0.5"],"Accept-Encoding":["gzip, deflate"],"Cookie":[]}} bytes_read=0 user_id= duration=0.168065318 size=651 status=500 resp_headers={"Status":["500 Internal Server Error"],"X-Powered-By":["PHP/8.3.1"],"Cache-Control":["no-cache, private"],"Content-Encoding":["gzip"],"Vary":["Accept-Encoding"],"Server":["Caddy"],"Date":["Mon, 22 Jan 2024 15:09:40 GMT"],"Content-Type":["text/html; charset=UTF-8"]} 
</span>

I can’t wrap my head around this

mouse, (edited )
@mouse@midwest.social avatar

This appears to be the exact same problem as github.com/mdshack/shotshare/issues/31

For testing I just spun up a VM with Docker, I tried the same compose file as you. I found I had to use the volume instead of a bind mount for /app/storage.

This compose file should work.


<span style="color:#323232;">version: "3.3"
</span><span style="color:#323232;">services:
</span><span style="color:#323232;">  shotshare:
</span><span style="color:#323232;">    ports:
</span><span style="color:#323232;">      - 2000:80
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - HOST=:80
</span><span style="color:#323232;">      - ALLOW_REGISTRATION=false
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - shotshare_data:/app/storage
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/database.sqlite:/app/database/database.sqlite
</span><span style="color:#323232;">      - /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/.env:/app/.env
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    container_name: shotshare
</span><span style="color:#323232;">    image: mdshack/shotshare:latest
</span><span style="color:#323232;">volumes:
</span><span style="color:#323232;">    shotshare_data:
</span><span style="color:#323232;">networks: {}
</span>
Tiritibambix,
@Tiritibambix@lemmy.ml avatar

Oh wow, thanks for trying this. It is working indeed.

I am an absolute begginer so let me ask. Where is shotshare_data on my machine ? Is it in docker volumes ( like /var/lib/docker/volumes/) ? Is there a way I can store data in /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/ ?

mouse,
@mouse@midwest.social avatar

It will be stored in /var/lib/docker/volumes, you can find the exact location by inspecting the volume. Use docker volume ls to list the volumes, and do docker volume inspect <volume_name> replacing <volume_name> with the one from the list. Look for “Mountpoint”, that is the exact location. You could try copying that to bind mount location, though I can’t be sure if it will continue to work.

mouse, (edited )
@mouse@midwest.social avatar

I just did another test.

You should be able to create the directories manually. I cheated by simply cloning the repo and copying them to the bind mount location like so. You can use the bind mount method like you wanted.


<span style="color:#323232;">git clone https://github.com/mdshack/shotshare
</span><span style="color:#323232;">cp -r shotshare/storage/* /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/shotshare_data/
</span><span style="color:#323232;">chown 82:82 -R /srv/dev-disk-by-uuid-7fe66601-5ca0-4c09-bc13-a015025fe53a/Files/Shotshare/shotshare_data
</span>
Tiritibambix,
@Tiritibambix@lemmy.ml avatar

Oh that’s great.

So do I need to keep this ?


<span style="color:#323232;">volumes:
</span><span style="color:#323232;">    shotshare_data:
</span>
mouse,
@mouse@midwest.social avatar

No, since you are using the bind mount, you do not need to use the volume.

Tiritibambix,
@Tiritibambix@lemmy.ml avatar

Thank you very much !

mouse,
@mouse@midwest.social avatar

You’re welcome! Also thanks for asking this question, I hadn’t seen ShotShare before, it looks useful.

N0x0n, (edited )

Ugh permission issues…

I have no idea how the shotshare image works, but an easier method is to specify the puid/pgid in the docker-compose:


<span style="color:#323232;">environment:
</span><span style="color:#323232;">  - PUID=82
</span><span style="color:#323232;">  - PGID=82
</span>

If the docker image supports it, the –user flag is also helpful :).

I know those works with volume mounts, no idea about bind mounts.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • selfhosted@lemmy.world
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #