Skip to content

Commit fb102cc

Browse files
authored
Merge pull request #920 from walt-id/opa-server-deployment
ci/cd : added opa server to docker-compose.yaml
2 parents a34cdf0 + f13850e commit fb102cc

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

docker-compose/.env

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ WEB_PORTAL_PORT=7102
66
VC_REPO_PORT=7103
77
DEV_WALLET_FRONTEND_PORT=7104
88
VAULT_PORT=8200
9+
OPA_SERVER_PORT=8181
910

1011
# database
1112
DB_NAME=waltid
@@ -24,5 +25,5 @@ MSSQL_DB_PORT=1433
2425
#sqlite | postgres | mssql
2526
DATABASE_ENGINE=postgres
2627
VERSION_TAG=0.11.0
27-
#identity | identity,tse | all
28+
#identity | identity,tse | identity,opa | all
2829
COMPOSE_PROFILES=identity

docker-compose/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ profiles to start the services for. Currently, the services are available with 2
107107
- approle - for my-role, where role-id and secret-id will be output in the console<sup>1</sup>
108108
- userpass - for myuser with mypassword
109109
- access-token - with dev-only-token
110+
- opa - for the Open Policy Agent service
110111

111112
Profiles can be combined, e.g. `COMPOSE_PROFILES=identity,tse` - will start the
112113
waltid-identity services and the vault (also can be done with the `all` profile).
@@ -138,6 +139,7 @@ docker-compose down -v
138139
- Issuer API: [http://localhost:7002](http://localhost:7002)
139140
- Verifier API: [http://localhost:7003](http://localhost:7003)
140141
- Hashicorp vault: [http://localhost:8200](http://localhost:8200)
142+
- Open Policy Agent: [http://localhost:8181](http://localhost:8181)
141143

142144
### Apps
143145

docker-compose/docker-compose.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ services:
5656
- .env
5757
volumes:
5858
- ./verifier-api/config:/waltid-verifier-api/config
59+
environment:
60+
OPA_SERVER_URL: "http://opa-server:8181"
5961

6062
waltid-demo-wallet:
6163
image: docker.io/waltid/waltid-demo-wallet:${VERSION_TAG:-latest}
@@ -180,6 +182,18 @@ services:
180182
volumes:
181183
- ./vault/init.sh:/vault/scripts/init.sh
182184

185+
opa-server:
186+
image: openpolicyagent/opa:latest
187+
container_name: opa-server
188+
profiles:
189+
- opa
190+
- all
191+
ports:
192+
- "$OPA_SERVER_PORT:8181"
193+
command: [ "run", "--server", "--addr", ":8181" ]
194+
extra_hosts:
195+
- "host.docker.internal:host-gateway"
196+
183197
caddy:
184198
image: docker.io/caddy:2
185199
restart: unless-stopped

0 commit comments

Comments
 (0)