linuxserver-archive / docker-codiad

GNU General Public License v3.0
21 stars 18 forks source link

No index.html results in 403 #22

Closed reavessm closed 5 years ago

reavessm commented 5 years ago

Command run:

docker run -d \
-p 443:443 \
-v /local/path:/config \
-e PUID=XXXX \
-e PGID=XXXX \
-e TZ=America/NewYork \
linuxserver/codiad"

When I log into 'https://localhost', I am greeted with the nginx '403 Forbidden' page. After digging through the code I found that /config/www/index.{html,php} does not exist. I then ran echo "Hello" >> /local/path/ww/index.html and revisited the site. Then I could see the 'Hello' message. This also seemed to happen when using HTTP as well as HTTPS.

I was running this on Gentoo Linux, docker version was 18.09.5, image version was latest.

tobbenb commented 5 years ago

No point in anonymising you PUID and PGID. It's also good for us to have fusing troubleshooting.

  1. You have mapped the wrong port. It's set to use port 80.
  2. You haven't set the host path for the /config volume mount correctly.
  3. You have a " at the end. Remove it.
  4. You forgot to set the name. --name=codiad
reavessm commented 5 years ago
  1. Your dockerfile exposes both ports 80 and 443, but I am getting the same result when mapping port 80 while using HTTP and mapping port 443 while using HTTPS
  2. Replace "/local/path" with "/mnt/VMStorage/Codiad" in my OP if you want my actual setup. I also set the PUID and PGID to be 1001. "/mnt/VMStorage/Codiad" is owned by 1001:1001 and has permissions of 775. I can wipe the directory, recreate the container, and it gets repopulated, so the container has write permissions
  3. Typo, I didn't actually run it with that command
  4. I did set that, just forgot to add it to the issue because it shouldn't affect anything, right?

I have tried to access this via an existing reverse-proxy, as well as locally. Both have the same result.

I can get the container running, the issue, at least I think, is because the '/config/www' directory only has an empty 'plugins' directory and nothing else.

j0nnymoe commented 5 years ago

Assuming /mnt/VMStorage/Codiad is a remote mount, Try putting it on your local file system.

reavessm commented 5 years ago

@j0nnymoe That worked! I created a ~/Codiad folder, mapped that to config, and it came up on the first try! But I have other containers running on that NFS share just fine? My ~/Codiad directory actually has less permissions (755 vs 775 with the other).

j0nnymoe commented 5 years ago

Yea we get this alot. We don't recommend putting /config mounts because stuff that uses sqlite etc don't like it.

reavessm commented 5 years ago

@j0nnymoe is there a sub directory that I can mount on NFS shares to hold the source files? Can I map like /config/projects on the share? I'm fine with user config stuff being wherever, but if I have a lot of projects, I don't want them cluttering things up

reavessm commented 5 years ago

Actually, this might not have been fixed. It's been trying to create the initial project for about 10 minutes now, and it's still spinning. Also the /config/projects directory is completely empty

j0nnymoe commented 5 years ago

Only thing I can suggest is try it and see what happens. Add in -v /path/to/host:/config/projects.

CHBMB commented 5 years ago

Just a heads-up @reavessm

We're in the process of deprecating this and releasing an alternative IDE as Codiad is no longer maintained upstream.