Skip to content

Commit

Permalink
Removed legacy docker compose usage (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
danyi1212 authored Nov 18, 2024
1 parent 93bb21e commit fee14db
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ jobs:
run: sed 's/:latest/:test/g' docker/docker-compose-example.yml > docker/docker-compose-test.yml

- name: Bring up stack
run: docker-compose -f docker/docker-compose-test.yml up -d
run: docker compose -f docker/docker-compose-test.yml up -d

- name: Check if OPA is healthy
run: ./scripts/wait-for.sh -t 60 http://localhost:8181/v1/data/users -- sleep 10 && curl -s "http://localhost:8181/v1/data/users" | jq '.result.bob.location.country == "US"'

- name: Output container logs
run: docker-compose -f docker/docker-compose-test.yml logs
run: docker compose -f docker/docker-compose-test.yml logs

# PUSH PHASE
- name: Output local docker images
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Besides Permit, OPAL is being used in Production in **Tesla**, **Walmart**, **Th

```
curl -L https://raw.githubusercontent.com/permitio/opal/master/docker/docker-compose-example.yml \
> docker-compose.yml && docker-compose up
> docker-compose.yml && docker compose up
```

<p>
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN chmod +x ./wait-for.sh
RUN ln -s /opal/wait-for.sh /usr/wait-for.sh

# netcat (nc) is used by the wait-for.sh script
RUN apt-get update && apt-get install -y netcat-traditional jq && apt-get clean
RUN apt-get update && apt-get install -y netcat-traditional jq wget && apt-get clean

# copy startup script (create link at old path to maintain backward compatibility)
COPY ./scripts/start.sh .
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/tutorials/run_opal_with_kafka.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ But (in version OPAL 0.1.21 and later) you can also use the `OPAL_BROADCAST_CHAN
- a Kafka topic is used to control which servers share clients and events.
- OPAL topics control which clients receive which policy or data events.

## Docker-compose Example
## Docker Compose Example

Check out `docker/docker-compose-with-kafka-example.yml` for running docker compose with OPAL-server, OPAL-client, Zookeeper, and Kafka.

Expand Down
10 changes: 5 additions & 5 deletions documentation/docs/tutorials/run_opal_with_pulsar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ volumes:
Run this configuration with:
```bash
docker-compose up --force-recreate
docker compose up --force-recreate
```

Allow a few seconds for Apache Pulsar and OPAL to start up before testing connectivity.
Expand All @@ -93,10 +93,10 @@ You should see the effect in:

| Backend | Environment Variable | Docker Compose Service |
|----------|---------------------------------------------------------|------------------------|
| Kafka | `BROADCAST_URL=kafka://localhost:9092` | `docker-compose up kafka` |
| Redis | `BROADCAST_URL=redis://localhost:6379` | `docker-compose up redis` |
| Postgres | `BROADCAST_URL=postgres://localhost:5432/broadcaster` | `docker-compose up postgres` |
| Pulsar | `BROADCAST_URL=pulsar://localhost:6650` | `docker-compose up pulsar` |
| Kafka | `BROADCAST_URL=kafka://localhost:9092` | `docker compose up kafka` |
| Redis | `BROADCAST_URL=redis://localhost:6379` | `docker compose up redis` |
| Postgres | `BROADCAST_URL=postgres://localhost:5432/broadcaster` | `docker compose up postgres` |
| Pulsar | `BROADCAST_URL=pulsar://localhost:6650` | `docker compose up pulsar` |

## Advanced: Publishing Events Directly to Pulsar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Clone the opal repository and run the example compose file from your local clone
```
git clone https://github.com/permitio/opal.git
cd opal
docker-compose -f docker/docker-compose-api-policy-source-example.yml up
docker compose -f docker/docker-compose-api-policy-source-example.yml up
```

The `docker-compose.yml` we just downloaded ([Click here to view its contents](https://github.com/permitio/opal/blob/master/docker/docker-compose-api-policy-source-example.yml)) is running 4 containers: Broadcast, OPAL Server, OPAL Client, and API bundle server.
Expand Down

0 comments on commit fee14db

Please sign in to comment.