how to using it in docker-compose with this
letiscoding opened this issue · 3 comments
version: "3"
services:
php:
build: .
volumes:
- ./html:/var/www/html
web:
image: nginx
links:
- php
ports:
- "8888:80"
volumes:
- php?/index.html:/var/www/html/index.html
- ./default.conf:/etc/nginx/conf.d/default.conf
volumes:
php:
driver:vieux/sshfs:latest
sshcmd: "usr@10.30.0.12:/swarm/data/web/"
password: ********
i want to amount a file index.html but i don't now how set it .on php? no.
So I figured this out it seems...
If you docker-compose up
and wait for it to get up then do docker volume ls
you will see it likely created another named volume prefixed with your container name.
22 version: '3'
21
20 services:
19
18 campnet-plex:
17 image: linuxserver/plex:latest
16 restart: always
15 ports:
14 - 32400:32400
13 - 32400:32400/udp
12 - 32469:32469/udp
11 - 32469:32469
10 - 5354:5353/udp
9 - 1900:1900/udp
8
7 environment:
6 - VERSION=latest
5 - PUID=1000
4 - PGID=1001
3 - TZ="America/Chicago"
2
1 volumes:
23 - campnet-movies:/campnet-movies
1 - $PWD/transcode:/transcode
2 - $PWD/config:/config
3 - $PWD/data:/data
4
5
6 labels:
7 - traefik.enable=true
8 - traefik.backend=campnet-plex
9 - traefik.frontend.rule=Host:plex.palehorse.lan
10 - traefik.docker.network=campnet_proxy
11 - traefik.port=32400
12 - traefik.protocol=http
13
14 networks:
15 - campnet_proxy
16 - host
17
18 networks:
19 campnet_proxy:
20 external: true
21 host:
22
23 volumes:
24 campnet-movies:
25 external: true
local c56947364a344e1f89783915dcd7f2eec46606017b8e787b478faa4668a97a82
vieux/sshfs:latest campnet-movies
local db6f8f428e2265cc21b3e0ad986053f6da066a1f1147b230a3673db578b99113
local dcec41b0692279a8c9c9e2f8921b5fb6e47ca38db79be823fe22e96404f146d3
local e9957de0f38858fe4f8488b448a97f1a1e862819b0460756e24c2afc63f61353
local ec13ca212fa6997c2632324ba5fd7559b7927329f55c7d33de00fe864cb4bd66
local f29556825f4152ed0ad83a1cae177462429258dae71e0e64a0aa45e5ac757058
local faf232309a7ff056c4e3f8d1f4ff54b0ec17383c2501adca68acf9b5cddfc77d
local fb26b292a42df4c440b6631e6b61a9c911f2db328f6b2bba6d1886c79201387e
vieux/sshfs:latest plex_campnet-movies
As you can see I have my first volume that I created campnet-movies
thinking hey I am doing this correctly.. then I looked and saw that it created that plex_campnet-movies
volume. I simply docker-compose down
then I recreated the volume with that name and docker-compose up
and now I can access my movies as root
.. still working on setting the permissions but yea I just figured this out and came here looking for help with permissions.. and saw your issue. Hope this helps..
See #48
volumes:
sshfs:
name: sshfs
driver: vieux/sshfs:latest
driver_opts:
sshcmd: "${USER}@${SERVER}:${PATH}"
password: "${PASSWORD}"
allow_other: ""
thank you very much,i get it. @Joniator @usmcamp0811