need4swede / Portall

Port Management Interface
MIT License
309 stars 5 forks source link

Can't start Portall #19

Closed DaveTSG closed 2 months ago

DaveTSG commented 2 months ago

Hello. I'm trying to get Portall up and running for the first time.

If I have a docker-compose.yml file with contents identical to the example provided:

version: '3'
services:
  portall:
    image: need4swede/portall:latest
    container_name: portall
    ports:
      - "8080:8080"
    environment:
      - SECRET_KEY=myKeyGoesHere
    volumes:
      - ./instance:/app/instance

The container appears to be loaded, and it shows up as "healthy" in Portainer. However, loading http://192.168.4.7:8080 results in a 404 error. Ditto https.

There is nothing in the logs other than a message saying "don't use this in production".

If instead I use the docker run command, again identical to the example given:

docker run -p 8080:8080 \
  -e SECRET_KEY=myKeyGoesHere \
  -e PORT=8080 \
  -v ./instance:/app/instance \
  Portall
[1] 97478
bash: qr: command not found
david@docker1:~/dockerfilesNotOnNAS/portall$ "docker run" requires at least 1 argument.
See 'docker run --help'.

Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Create and run a new container from an image
^C
[1]+  Exit 1                  docker run -p 8080:8080 -e SECRET_KEY=myKeyGoesHere

...and that's it. Nothing loads. Any suggestions please?

Thanks in advance.

Idleite commented 2 months ago

try git cloning the repo and changing your docker compose to build: . instead of the image line

Idleite commented 2 months ago

also your docker run does not include the image at all

DaveTSG commented 2 months ago

try git cloning the repo and changing your docker compose to build: . instead of the image line

Thanks for your reply. I've never had to do this before so have no idea what I'm doing, but I gathered I need to install gh using apt install gh, then log in to GitHub (which I managed), then run gh repo clone need4swede/Portall.

This resulted in files being downloaded to /home/david/dockerfilesNotOnNAS/portall/Portall (e.g. your app.py, Dockerfile, etc. files are all inside that directory). For reference, my docker-compose.yml file is located the directory above, i.e. at /home/david/dockerfilesNotOnNAS/portall/ I'm not sure if that's the right thing to have done.

In any case, that didn't work.

also your docker run does not include the image at all

I have no idea how to fix that, either. I tried a bunch of things after reading the Docker run command documentation, but I couldn't figure it out.

I eventually noticed that /home/david/dockerfilesNotOnNAS/portall/Portall/docker-compose.yml exists. I opened that and my own docker-compose.yml side-by-side and they are identical, but nonetheless I added my secret key and then ran docker up on your docker-compose.yml file (rather than my own), and bingo! All working.

I have no idea why my docker-compose.yml file wouldn't work and yours did, but ...shrug, it's working now.

Thanks.