-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add env variables to help with running in docker. Add example docker compose file. Add Dockerfile for building a container.
- Loading branch information
1 parent
a45cac7
commit 2dbfcc9
Showing
6 changed files
with
118 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
docker build -t fedservice -f ./fedservice.Dockerfile .. --no-cache |
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,66 @@ | ||
services: | ||
wallet_provider: | ||
image: fedservice | ||
command: "wallet_provider" | ||
ports: | ||
- "5001:5001" | ||
environment: | ||
FEDSERVICE_ENTITYID: https://example.com:5001 | ||
FEDSERVICE_WEBCERT_KEY: /cert/privkey.pem | ||
FEDSERVICE_WEBCERT_CHAIN: /cert/chain.pem | ||
FEDSERVICE_SECRET_KEY: 12345678909987654321 | ||
FEDSERVICE_DEBUG: true | ||
FEDSERVICE_PORT: 5001 | ||
FEDSERVICE_BIND: 0.0.0.0 | ||
volumes: | ||
- ./wallet_provider:/wallet_provider:rw | ||
- ./certificates:/certs:ro | ||
trust_mark_issuer: | ||
image: fedservice | ||
command: "trust_mark_issuer" | ||
ports: | ||
- "6001:6001" | ||
environment: | ||
FEDSERVICE_ENTITYID: https://example.com:5005 | ||
FEDSERVICE_WEBCERT_KEY: /cert/privkey.pem | ||
FEDSERVICE_WEBCERT_CHAIN: /cert/chain.pem | ||
FEDSERVICE_SECRET_KEY: 12345678909987654321 | ||
FEDSERVICE_DEBUG: true | ||
FEDSERVICE_PORT: 6001 | ||
FEDSERVICE_BIND: 0.0.0.0 | ||
volumes: | ||
- ./trust_mark_issuer:/trust_mark_issuer:rw | ||
- ./certificates:/certs:ro | ||
trust_anchor: | ||
image: fedservice | ||
command: "trust_anchor" | ||
ports: | ||
- "7001:7001" | ||
environment: | ||
FEDSERVICE_ENTITYID: https://example.com:7001 | ||
FEDSERVICE_WEBCERT_KEY: /cert/privkey.pem | ||
FEDSERVICE_WEBCERT_CHAIN: /cert/chain.pem | ||
FEDSERVICE_SECRET_KEY: 12345678909987654321 | ||
FEDSERVICE_DEBUG: true | ||
FEDSERVICE_PORT: 7001 | ||
FEDSERVICE_BIND: 0.0.0.0 | ||
volumes: | ||
- ./trust_anchor:/trust_anchor:rw | ||
- ./certificates:/certs:ro | ||
flask_wallet: | ||
image: fedservice | ||
command: "flask_wallet" | ||
ports: | ||
- "5005:5005" | ||
environment: | ||
FEDSERVICE_ENTITYID: https://example.com:5005 | ||
FEDSERVICE_WEBCERT_KEY: /cert/privkey.pem | ||
FEDSERVICE_WEBCERT_CHAIN: /cert/chain.pem | ||
FEDSERVICE_SECRET_KEY: 12345678909987654321 | ||
FEDSERVICE_DEBUG: true | ||
FEDSERVICE_PORT: 5005 | ||
FEDSERVICE_BIND: 0.0.0.0 | ||
volumes: | ||
- ./flask_wallet:/flask_wallet:rw | ||
- ./certificates:/certs:ro | ||
|
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,21 @@ | ||
FROM python:3.12-bookworm | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
git \ | ||
python3-dev \ | ||
build-essential \ | ||
python3-pip \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
xmlsec1 \ | ||
libyaml-dev | ||
RUN pip3 install --upgrade pip setuptools | ||
COPY . /fedservice | ||
RUN pip3 install -r fedservice/docker/requirements.docker | ||
RUN pip3 install /fedservice | ||
COPY docker/start.sh . | ||
ENTRYPOINT ["/start.sh"] | ||
#RUN cp /src/fedservice/setup_federation/entity.py / | ||
#RUN sed -e "s@'templates'@'data/templates'@" -e "s@sys.path.insert(0, dir_path)@sys.path.insert(0, dir_path)\n app.config['SECRET_KEY'] = os.urandom(12).hex()@" /src/fedservice/setup_federation/entity.py > /entity.py && \ | ||
# chmod u+x /entity.py | ||
|
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,4 @@ | ||
-e git+https://github.com/IdentityPython/idpy-oidc.git@dpop_add#egg=idpyoidc | ||
-e git+https://github.com/rohe/openid4v.git#egg=openid4v | ||
-e git+https://github.com/rohe/idpy-sdjwt.git#egg=idpysdjwt | ||
flask |
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 @@ | ||
#!/bin/bash | ||
|
||
for file in conf.json views.py; do | ||
if [ ! -f /"${1}"/"${file}" ]; then | ||
echo "No ${file} found, copying to /wallet_provider/" | ||
cp /fedservice/setup_federation/"${1}"/"${file}" /"${1}"/ | ||
else | ||
echo "${file} found, leaving alone. Beware when upgrading." | ||
|
||
fi | ||
done | ||
echo "Starting wallet_provider." | ||
/fedservice/setup_federation/entity.py "$@" |
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