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

Switch to Docker Compose v2 #1287

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bridge-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
working-directory: bridge

- name: Start dependencies
run: docker-compose -f "bridge/testing-docker-compose.yml" up -d
run: docker compose -f "bridge/testing-docker-compose.yml" up -d

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
Expand All @@ -90,7 +90,7 @@ jobs:
run: ./run-tests.sh

- name: Stop dependencies
run: docker-compose -f "bridge/testing-docker-compose.yml" down
run: docker compose -f "bridge/testing-docker-compose.yml" down

# deny-check:
# name: cargo-deny check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: ./generate-openapi.sh --check

- name: Start dependencies
run: docker-compose -f "server/testing-docker-compose.yml" up -d
run: docker compose -f "server/testing-docker-compose.yml" up -d

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
Expand All @@ -96,7 +96,7 @@ jobs:
run: ./run-tests.sh

- name: Stop dependencies
run: docker-compose -f "server/testing-docker-compose.yml" down
run: docker compose -f "server/testing-docker-compose.yml" down
# deny-check:
# name: cargo-deny check
# runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/server-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ jobs:
- uses: actions/checkout@v4

- name: Build server image
run: docker-compose build
run: docker compose build
working-directory: ./server

- name: Run server with docker-compose
run: docker-compose up -d
run: docker compose up -d
working-directory: ./server

- name: Check server container is up and running
run: curl --retry 5 --retry-all-errors http://localhost:8071/api/v1/health/

- name: Display server container logs
if: failure()
run: docker-compose logs backend
run: docker compose logs backend
working-directory: ./server

- name: Terminate docker-compose created containers
- name: Terminate docker compose created containers
if: always()
run: docker-compose down -v
run: docker compose down -v
working-directory: ./server
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,17 @@ Please refer to the [server configuration](#server-configuration) section below

You can use the official Svix Docker image from [Docker Hub](https://hub.docker.com/r/svix/svix-server). You can either use the `latest` tag, or one of [the versioned tags](https://hub.docker.com/r/svix/svix-server/tags) instead.

You can either use the example [docker-compose.yml](./server/docker-compose.yml) file with `docker-compose` (easiest), `docker swarm` (advanced), or run the container standalone.
You can either use the example [docker-compose.yml](./server/docker-compose.yml) file with `docker compose` (easiest), `docker swarm` (advanced), or run the container standalone.

#### With Docker Compose

This alternative is the easiest because it will also boot up and configure `redis` and `postgresql`.

This assumes you have docker-compose installed.
This assumes you have Docker Compose v2 installed.

```
cd server
docker-compose up
docker compose up
```

#### Standalone container
Expand Down
4 changes: 2 additions & 2 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ cargo watch -x run

This however will fail, as you also need to point the server to the database and setup a few other configurations.

The easiest way to achieve that is to use docker-compose to setup a dockerize development environment, and the related config.
The easiest way to achieve that is to use docker compose to setup a dockerize development environment, and the related config.

```
# From the svix inner directory
cp development.env .env
# Set up docker (may need sudo depending on your setup)
docker-compose up
docker compose up
```

Now run `cargo watch -x run` again to start the development server against your local docker environment.
Expand Down