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

ci/cd : added opa server to docker-compose.yaml #920

Merged
merged 10 commits into from
Feb 4, 2025
3 changes: 2 additions & 1 deletion docker-compose/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ WEB_PORTAL_PORT=7102
VC_REPO_PORT=7103
DEV_WALLET_FRONTEND_PORT=7104
VAULT_PORT=8200
OPA_SERVER_PORT=8181

# database
DB_NAME=waltid
Expand All @@ -24,5 +25,5 @@ MSSQL_DB_PORT=1433
#sqlite | postgres | mssql
DATABASE_ENGINE=postgres
VERSION_TAG=0.11.0
#identity | identity,tse | all
#identity | identity,tse | identity,opa | all
COMPOSE_PROFILES=identity
2 changes: 2 additions & 0 deletions docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ profiles to start the services for. Currently, the services are available with 2
- approle - for my-role, where role-id and secret-id will be output in the console<sup>1</sup>
- userpass - for myuser with mypassword
- access-token - with dev-only-token
- opa - for the Open Policy Agent service

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

### Apps

Expand Down
14 changes: 14 additions & 0 deletions docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ services:
- .env
volumes:
- ./verifier-api/config:/waltid-verifier-api/config
environment:
OPA_SERVER_URL: "http://opa-server:8181"

waltid-demo-wallet:
image: docker.io/waltid/waltid-demo-wallet:${VERSION_TAG:-latest}
Expand Down Expand Up @@ -180,6 +182,18 @@ services:
volumes:
- ./vault/init.sh:/vault/scripts/init.sh

opa-server:
image: openpolicyagent/opa:latest
container_name: opa-server
profiles:
- opa
- all
ports:
- "$OPA_SERVER_PORT:8181"
command: [ "run", "--server", "--addr", ":8181" ]
extra_hosts:
- "host.docker.internal:host-gateway"

caddy:
image: docker.io/caddy:2
restart: unless-stopped
Expand Down