Skip to content

Commit c4b6299

Browse files
authored
Switch to Docker Compose v2 (#1287)
The docker-compose command is apparently no longer available in GitHub's CI runners by default (CI failed on main).
1 parent 5311b6b commit c4b6299

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.github/workflows/bridge-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
working-directory: bridge
8080

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

8484
- name: Clippy
8585
run: cargo clippy --all-targets --all-features -- -D warnings
@@ -90,7 +90,7 @@ jobs:
9090
run: ./run-tests.sh
9191

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

9595
# deny-check:
9696
# name: cargo-deny check

.github/workflows/server-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
run: ./generate-openapi.sh --check
7676

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

8080
- name: Clippy
8181
run: cargo clippy --all-targets --all-features -- -D warnings
@@ -96,7 +96,7 @@ jobs:
9696
run: ./run-tests.sh
9797

9898
- name: Stop dependencies
99-
run: docker-compose -f "server/testing-docker-compose.yml" down
99+
run: docker compose -f "server/testing-docker-compose.yml" down
100100
# deny-check:
101101
# name: cargo-deny check
102102
# runs-on: ubuntu-latest

.github/workflows/server-docker-image.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ jobs:
2121
- uses: actions/checkout@v4
2222

2323
- name: Build server image
24-
run: docker-compose build
24+
run: docker compose build
2525
working-directory: ./server
2626

2727
- name: Run server with docker-compose
28-
run: docker-compose up -d
28+
run: docker compose up -d
2929
working-directory: ./server
3030

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

3434
- name: Display server container logs
3535
if: failure()
36-
run: docker-compose logs backend
36+
run: docker compose logs backend
3737
working-directory: ./server
3838

39-
- name: Terminate docker-compose created containers
39+
- name: Terminate docker compose created containers
4040
if: always()
41-
run: docker-compose down -v
41+
run: docker compose down -v
4242
working-directory: ./server

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ Please refer to the [server configuration](#server-configuration) section below
139139

140140
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.
141141

142-
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.
142+
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.
143143

144144
#### With Docker Compose
145145

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

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

150150
```
151151
cd server
152-
docker-compose up
152+
docker compose up
153153
```
154154

155155
#### Standalone container

server/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ cargo watch -x run
7070

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

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

7575
```
7676
# From the svix inner directory
7777
cp development.env .env
7878
# Set up docker (may need sudo depending on your setup)
79-
docker-compose up
79+
docker compose up
8080
```
8181

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

0 commit comments

Comments
 (0)