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

Update docker configs and documentation #71

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ COPY --from=build /app/exec/target/opensrp-gateway-plugin-exec.jar /app/
COPY resources/hapi_page_url_allowed_queries.json resources/hapi_page_url_allowed_queries.json
COPY resources/hapi_sync_filter_ignored_queries.json resources/hapi_sync_filter_ignored_queries.json

CMD ["/app/opensrp-gateway-plugin-exec.jar"]
CMD ["/app/opensrp-gateway-plugin-exec.jar", "--server.max-http-header-size=40KB"]
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,19 +229,51 @@ environment variables

### Run project

#### Using Java Command

As documented on the Info Gateway modules
[section here](https://github.com/google/fhir-gateway#modules), the command to
run is:

```console
$ java -jar exec/target/opensrp-gateway-plugin-exec.jar --server.port=8081
$ java -jar exec/target/opensrp-gateway-plugin-exec.jar --server.port=8080 --server.max-http-header-size=40KB
```

After a successful build, the built-in _Tomcat container_ will automatically
deploy your _Spring Boot application_. You can access your application in a web
browser by navigating to http://localhost:8080 (default) or the specified port
in your application's configuration.

#### Using Docker

To run the project using Docker, follow these steps:

1. Build the Docker image:

Navigate to the directory containing the Dockerfile and execute the following
command:

```console
docker build -t opensrp-gateway-plugin .
```

2. Run the Docker container:

Once the image is built, you can run the container with the following command:

```console
docker run -p 8080:8080 opensrp-gateway-plugin
```

This command maps port 8080 on your host to port 8080 in the Docker container.
Adjust the port as necessary to match your configuration.

3. Access the Application:

After the container is running, you can access your application in a web browser
by navigating to http://localhost:8080 (or the specified port if you changed
it).

### Tests

To run the unit tests use the command below which both runs tests and generates
Expand Down
Loading