-
Notifications
You must be signed in to change notification settings - Fork 98
feat: added Dockerfile and docker-compose support #192
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
base: main
Are you sure you want to change the base?
feat: added Dockerfile and docker-compose support #192
Conversation
Signed-off-by: Akella Srinivas <[email protected]>
7ba293b to
f6ab8f5
Compare
Achanandhi-M
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Srinu346 , the changes look good overall 👍
A couple of suggestions:
-
Please avoid using the
latestAlpine image in the Dockerfile and switch to a specific version instead. -
The README should cover two ways to run the app:
- Using Docker Compose
- Running the app without Docker
Currently, it only documents the Docker Compose method.
-
Please remove the
gocoveragecommand from the Keploy test command. We don’t have agocoverageflag when running Keploy via the Docker Compose method.
9e3cfee to
f6ab8f5
Compare
Signed-off-by: Akella Srinivas <[email protected]>
|
@Achanandhi-M sir made the described changes, please take a look. |
Signed-off-by: Akella Srinivas <[email protected]>
Signed-off-by: Akella Srinivas <[email protected]>
Achanandhi-M
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Srinu346,
Could you please update the README when you get a chance? It would be great if it could include both the record and replay commands, along with the appropriate curl commands for testing.
|
@Achanandhi-M sir |
fasthttp-postgres/README.md
Outdated
|
|
||
| Capture testcases: | ||
| ```shell | ||
| keploy record -c "docker-compose up" --container-name=fasthttp_app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Srinu346 I noticed that there’s no keploy test command mentioned in option 1, and there are also no curl commands provided. Could you please clarify how users are expected to test this without the curl commands?
fasthttp-postgres/README.md
Outdated
|
|
||
| Run With Docker: | ||
| ```shell | ||
| keploy test -c "docker-compose up" --container-name=fasthttp_app --delay 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the keploy test Docker Compose up command has been added in option 2, but the Docker setup isn’t mentioned. Could you please clarify how this is expected to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Srinu346,
Users should be able to navigate clearly in both the Docker and non-Docker setups. Could you please add the curl commands for both setups and clearly mention the steps? Also, please go through the comments carefully. Also please sign the DCO
Signed-off-by: Akella Srinivas <[email protected]>
1f31070 to
5d01bd0
Compare
|
Hello @Achanandhi-M sir, My initial assumption was to keep the steps till keploy record and the curl commands common for both Docker and non-Docker setups, and then split only at the testing stage. I see now that this makes the flow unclear.
Now I’ve updated the flow and clearly split the Docker and non-Docker paths separately now. Each Path independently includes:
Thanks for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Srinu346, could you please fix the issues I mentioned and refer to the Keploy docs while doing so? It would be great if you could test everything from your side before raising the PR, as it helps save reviewers’ time. Thank you for understanding. also please fix the linter issue
fasthttp-postgres/README.md
Outdated
|
|
||
| ```shell | ||
| keploy test -c "./app" --goCoverage --delay 10 | ||
| keploy test -c "go run main.go" --goCoverage --delay 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Srinu346, could you please update the test command and remove --goCoverage? We’ve removed it recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed it now sir.
fasthttp-postgres/README.md
Outdated
| #### Start the Postgres container: | ||
| ```bash | ||
| go build -cover | ||
| docker-compose up -d postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docker-compose command is deprecated. Please use the docker compose command instead. Kindly try it from your side, and if it works, proceed with the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed all the docker-compose to docker compose . I have also checked them by running on my machine.
fasthttp-postgres/README.md
Outdated
|
|
||
| ### Option 2: Run Without Docker | ||
|
|
||
| > Note: When running the app locally, ensure `DB_HOST=localhost` is set in the environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement isn’t very clear about where the environment variables should be added. The environment variables should be added inside the Postgres service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I have removed that line completely, sir.
When the application is run fully using Docker, these values are injected automatically via Docker Compose (as shown below).
Otherwise, the application falls back to the default values, so there is no need for users to manually set the environment variables.

Please let me know if this approach looks fine or if you’d prefer the environment variables to be explicitly documented instead.
fasthttp-postgres/README.md
Outdated
|
|
||
| #### Run the application: | ||
| ```bash | ||
| go run main.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t need a separate command to run the application. Keploy starts the app automatically when it runs, so please remove this line. For more context, kindly refer to the Quickstart documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK sir i have removed them.
fasthttp-postgres/README.md
Outdated
| #### Start the server: | ||
| ```bash | ||
| sudo docker-compose up -d postgres | ||
| docker-compose up --build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t need a separate command to run the application. Keploy starts the app automatically when it runs, so please remove this line. For more context, kindly refer to the Quickstart documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK sir i have removed them.
515dde3 to
5d01bd0
Compare
Signed-off-by: Akella Srinivas <[email protected]>
|
@Achanandhi-M sir, I’ve gone through the Keploy quickstart guide and updated the commands accordingly. I’ve also fixed the lint issues and addressed the above review comments. Please let me know if any further changes are needed. |
Achanandhi-M
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Srinu346, the changes look really great—nice work! I just have one piece of feedback.
In the Option 2 setup, the user needs to create a .env file to pass the environment variables, but this isn’t mentioned clearly in the README. As a first-time user following the guide, I wasn’t able to run it successfully.
Have you tried this from your side? Is it working fine for you?
|
Hey @Srinu346, could you please confirm by running it with Keploy? Also, please try running the first method followed by the second method. I just want to confirm everything is working properly before merging the PR. |
Signed-off-by: Akella Srinivas <[email protected]>
|
After your review sir, I revisited the setup and realized that Keploy does not automatically pick up environment variables from docker-compose.yml, which is why the .env file was added and the README updated accordingly. First method Screen.Recording.2026-01-06.144900.mp4Second method Screen.Recording.2026-01-06.154836.mp4 |




Summary
Adds Dockerfile and docker-compose support to the
fasthttp-postgresquickstart for easier setup.Changes
Fixes
url
Screenshots