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

Fixes #17 - Dockerfile for creating container image #7

Merged
merged 2 commits into from Jan 11, 2021

Conversation

patilsuraj767
Copy link
Contributor

No description provided.

@patilsuraj767
Copy link
Contributor Author

Steps to test the PR-

1) docker build -t ros-test .

Build command may return error - Failed to load paths: /bin/sh: /opt/app-root/src/.local/share/virtualenvs/src-dqYAXZ28/bin/python: No such file or directory but this can be ignored. Pipenv issue

2) docker run -d --rm --name ros-db --env POSTGRES_PASSWORD=postgres --env POSTGRES_USER=postgres --env POSTGRES_DB=postgres postgres
3) docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ros-db

3rd command will return the IP of ros-db, use it in next command.

4) docker run --rm --env ROS_DB_HOST=<IP OF ROS-DB> --env ROS_DB_PORT=5432 --name ros-backend -it ros-test
5) docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ros-backend
6) curl http://<IP Of ROS-backend>:8080/api/status

Copy link
Collaborator

@kgaikwad kgaikwad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
Tested it, works fine!

$ curl http://<IP of ROS-backend>:8080/api/status
{"status": "Application is running!"}
$ curl http://<IP of ROS-backend>:8080/api/systems
{"results":[{"account":"12345","display_name":"machine1-rhel_test123", .... }]}

IP Of ROS-backend: Copied IP from step(5)

@kgaikwad kgaikwad merged commit 8304b82 into RedHatInsights:main Jan 11, 2021
@kgaikwad
Copy link
Collaborator

Thanks @patilsuraj767

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

Successfully merging this pull request may close these issues.

None yet

2 participants