This repository has been archived by the owner on May 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from paritytrading/features/fix
Add 'parity-fix' module
- Loading branch information
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM openjdk:8-jre-alpine | ||
|
||
ENV PARITY_VERSION "0.5.0" | ||
|
||
ADD https://repo1.maven.org/maven2/com/paritytrading/parity/parity-fix/$PARITY_VERSION/parity-fix-$PARITY_VERSION.jar /opt/parity/parity-fix.jar | ||
|
||
RUN chmod 644 /opt/parity/parity-fix.jar | ||
|
||
COPY docker-entrypoint.sh / | ||
|
||
EXPOSE 4010 | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Parity FIX Gateway | ||
================== | ||
|
||
This directory defines a Docker image for the Financial Information Exchange | ||
(FIX) gateway. | ||
|
||
|
||
Configuration | ||
------------- | ||
|
||
The Docker container is configured using environment variables. | ||
|
||
The following environment variables are optional: | ||
|
||
- `PARITY_FIX_ORDER_ENTRY_ADDRESS`: The IP address of the matching engine. | ||
|
||
- `PARITY_FIX_ORDER_ENTRY_PORT`: The TCP port for order entry at the matching | ||
engine. | ||
|
||
|
||
Build | ||
----- | ||
|
||
Build the Docker image: | ||
|
||
docker build --tag parity-fix . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cat > /opt/parity/parity-fix.conf <<-EOF | ||
fix { | ||
address = 0.0.0.0 | ||
port = 4010 | ||
sender-comp-id = parity | ||
} | ||
order-entry { | ||
address = ${PARITY_FIX_ORDER_ENTRY_ADDRESS:-"parity-system"} | ||
port = ${PARITY_FIX_ORDER_ENTRY_PORT:-"4000"} | ||
} | ||
EOF | ||
|
||
exec /usr/bin/java -jar /opt/parity/parity-fix.jar /opt/parity/parity-fix.conf |