Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This site can't be reached :( #97

Closed
clarkburbidge opened this issue May 26, 2020 · 3 comments
Closed

This site can't be reached :( #97

clarkburbidge opened this issue May 26, 2020 · 3 comments

Comments

@clarkburbidge
Copy link

clarkburbidge commented May 26, 2020

Finished the steps here: https://github.com/grocy/docs/blob/master/tutorials/setup.md#docker-container, but my site cannot be reached at http://< ip-address-of-your-server >. I think I'm pretty smart because I put in my public EC2 IP address in for < ip-address-of-your-server >. I also made the changes to the docker-compose.yml file recommended by @verginer here: #95 (comment).

What are some tests I can run to see if my EC2 instance of AMI with Docker and grocy-docker is working besides hitting the public IP in a browser?

[ec2-user@ip- ~]$ cd grocy-docker/
[ec2-user@ip- grocy-docker]$ ls
CHANGELOG.md        Dockerfile-grocy-nginx  grocy.env  package.json
docker-compose.yml  docker_grocy            LICENSE    package-lock.json
Dockerfile-grocy    docker_nginx            Makefile   README.md
[ec2-user@ip- ~]$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[ec2-user@ip- ~]$ curl http://localhost:49167
curl: (7) Failed to connect to localhost port 49167: Connection refused
@jayaddison
Copy link
Contributor

Hi @clarkburbidge - one problem here is that grocy containers weren't yet running when you ran the curl command.

docker ps should list two running containers for grocy - one named grocy (a PHP application server), and one named nginx (a web server / proxy).

Although the advice in #95 makes a grocy application public (on both port 80 (HTTP) and port 443 (HTTPS)), it's best to ensure that grocy is running locally first before allowing connections from the outside world.

I'd recommend:

  1. Temporarily undo the changes from Running Grocy-Docker on AWS #95
  2. Set up a TLS certificate and test web server on your EC2 instance (this may help: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html )
  3. Follow the grocy Docker setup tutorial
  4. Confirm that the application is running by using curl http://localhost
  5. Configure nginx to use the TLS certificate you created earlier -- note: this isn't easy right now; we will need more support for this in the grocy-docker codebase
  6. Set up the grocy admin user's password
  7. Only now consider applying the changes from Running Grocy-Docker on AWS #95 again -- and consider only exposing port 443; plain HTTP isn't a great idea for systems that requires login by username and password

@clarkburbidge
Copy link
Author

Thanks for your help! I don't think I'm technically up for the challenge. I used to limp along on LAMP back in the Drupal 6 days, but back then Nginx was brand new and Docker wasn't even a thing.

I'll check back in a few months to see if the community or documentation has caught up to my need for detailed instructions or huge user groups who camp on StackOverflow . :) Too bad, because I'm great at documentation.

@jayaddison
Copy link
Contributor

No problem @clarkburbidge - yep, we can definitely make this easier in future.

If you like, you could follow progress by subscribing to grocy/docs#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants