Skip to content

Commit

Permalink
Merge pull request #1 from ISISComputingGroup/containerfile
Browse files Browse the repository at this point in the history
Containerfile
  • Loading branch information
rerpha authored Jan 17, 2025
2 parents a0b63ec + e0f71b8 commit d3ef897
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM python:3

WORKDIR /usr/src/app

COPY pyproject.toml ./

RUN pip install --no-cache-dir .

# Expose ports for kafka, EPICS CA, EPICS PVA
EXPOSE 9092 5064 5065 5075 5076

COPY . .

ENTRYPOINT ["python", "./forwarder_launch.py"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ Only non-TLS channels (`SASL_PLAINTEXT`) are currently supported.
The SASL mechanism can be specified as part of the username/broker string as follows: `sasl_mechanism\username@broker:port/topic`.
Example: `SCRAM-SHA-256\[email protected]:9092/topic`.

### Running in container
To build the forwarder for use within a container, use `docker build . --tag forwarder:latest`.

To use the container run `docker run -it forwarder:latest` followed by your options ie.
`docker run -it forwarder:latest --config-topic mybroker:9092/configTopic . . . `

## Configuring EPICS PVs to be forwarded

Adding or removing PVs to be forwarded is done by publishing configuration change messages to the configuration
Expand Down
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Adopt pip-tools to manage requirements.txt files
* Refactor statistics reporter to support dynamically added metrics
* Add latency and per-PV graphite metrics
* Add containerfile

## v2.1.0

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = [
"p4p",
"confluent_kafka",
"graphyte",
"numpy >= 1.21",
"numpy >= 1.21, <2.0",
"ConfigArgParse",
"ess-streaming-data-types",
"tomli",
Expand Down

0 comments on commit d3ef897

Please sign in to comment.