Skip to content

Commit

Permalink
Changed docker-compose command to the recommended docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Dec 5, 2024
1 parent 5f25cea commit b2bd369
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4

- name: Start containers
run: docker-compose -f "docker-compose.yml" up -d
run: docker compose -f "docker-compose.yml" up -d

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ $ docker pull oskardudycz/eventsourcing.js.simple
4. Build Docker Compose based on the `docker-compose.yml` file in the current directory
```bash
$ docker-compose build
$ docker compose build
```
5. Show running containers
Expand All @@ -1233,22 +1233,22 @@ $ docker ps
$ docker ps -a
```
7. Start services with docker-compose
7. Start services with docker compose
```bash
$ docker-compose up
$ docker compose up
```
8. Kill all services from docker-compose
8. Kill all services from docker compose
```bash
$ docker-compose kill
$ docker compose kill
```
6. Remove all services and clean the data from docker-compose
6. Remove all services and clean the data from docker compose
```bash
$ docker-compose down -v
$ docker compose down -v
```
#### Container registry
Expand Down
4 changes: 2 additions & 2 deletions samples/eventsVersioning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ Follow the instructions in exercises folders.

## Ensuring that all is setup correctly

1. Run: `docker-compose up` to start EventStoreDB docker image.
1. Run: `docker compose up` to start EventStoreDB docker image.
2. Run `npm run test:solved`. If all is fine then all tests should be green.

## Running

1. Run: `docker-compose up` to start EventStoreDB docker image.You should automatically get EventStoreDB UI: http://localhost:2113/
1. Run: `docker compose up` to start EventStoreDB docker image.You should automatically get EventStoreDB UI: http://localhost:2113/
2. You can get build watch by running `npm run build:ts:watch`.
3. To run test for exercises run `npm run test:exercise`. For solutions run `npm run test:solved`, for all `npm run test`.
4. Whe you're working with exercise and want to have tests running on file change run `npm run test:exercise:watch`.
2 changes: 1 addition & 1 deletion samples/from_crud_to_eventsourcing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The assumption to have such a generic approach was that we're using a rich front

### Docker

1. Run: `docker-compose up`.
1. Run: `docker compose up`.
2. Wait until all dockers got are downloaded and running.
3. You should automatically get:
- Postgres DB
Expand Down
4 changes: 2 additions & 2 deletions samples/from_crud_to_eventsourcing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"fix": "run-s fix:eslint fix:prettier",
"fix:prettier": "prettier --write \"**/**/!(*.d).{ts,json,md,sql}\"",
"fix:eslint": "eslint **/*.ts --fix",
"crud:recreate": "docker-compose kill & docker-compose down -v & docker-compose up -d & npm run crud:setup & docker ps",
"crud:recreate": "docker compose kill & docker compose down -v & docker compose up -d & npm run crud:setup & docker ps",
"crud:setup": "run-s crud:migrate crud:generate",
"crud:migrate": "pg-migrations apply --database postgres://postgres:postgres@localhost:5432/postgres --directory ./src/crud/migrations/",
"crud:migrate:raw": "pg-migrations apply",
"crud:generate": "npx @databases/pg-schema-cli --database postgres://postgres:postgres@localhost:5432/postgres --schemaName ecommerce --directory src/crud/db/__generated__",
"crud:start": "ts-node -r tsconfig-paths/register ./src/crud/index.ts",
"eventsourced:recreate": "docker-compose kill & docker-compose down -v & docker-compose up -d & npm run eventsourced:setup & docker ps",
"eventsourced:recreate": "docker compose kill & docker compose down -v & docker compose up -d & npm run eventsourced:setup & docker ps",
"eventsourced:setup": "run-s eventsourced:migrate eventsourced:generate",
"eventsourced:generate": "npx @databases/pg-schema-cli --database postgres://postgres:postgres@localhost:5432/postgres --schemaName ecommerce --directory src/eventsourced/db/__generated__",
"eventsourced:migrate": "pg-migrations apply --database postgres://postgres:postgres@localhost:5432/postgres --directory ./src/eventsourced/migrations/ --ignore-error migration_file_edited",
Expand Down
4 changes: 2 additions & 2 deletions samples/hotelManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ Follow the instructions in exercises folders.

## Ensuring that all is setup correctly

1. Run: `docker-compose up` to start EventStoreDB docker image.
1. Run: `docker compose up` to start EventStoreDB docker image.
2. Run `npm run test:solved`. If all is fine then all tests should be green.

## Running

1. Run: `docker-compose up` to start EventStoreDB docker image.You should automatically get EventStoreDB UI: http://localhost:2113/
1. Run: `docker compose up` to start EventStoreDB docker image.You should automatically get EventStoreDB UI: http://localhost:2113/
2. You can get build watch by running `npm run build:ts:watch`.
3. To run test for exercises run `npm run test:exercise`. For solutions run `npm run test:solved`, for all `npm run test`.
4. Whe you're working with exercise and want to have tests running on file change run `npm run test:exercise:watch`.
4 changes: 2 additions & 2 deletions samples/unpeelingOnion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"fix": "run-s fix:eslint fix:prettier",
"fix:prettier": "prettier --write \"**/**/!(*.d).{ts,json,md,sql}\"",
"fix:eslint": "eslint **/*.ts --fix",
"crud:recreate": "docker-compose kill & docker-compose down -v & docker-compose up -d & npm run crud:setup & docker ps",
"crud:recreate": "docker compose kill & docker compose down -v & docker compose up -d & npm run crud:setup & docker ps",
"crud:setup": "run-s crud:migrate crud:generate",
"crud:migrate": "pg-migrations apply --database postgres://postgres:Password12!@localhost:5432/postgres --directory ./src/crud/migrations/",
"crud:migrate:raw": "pg-migrations apply",
"crud:generate": "npx @databases/pg-schema-cli --database postgres://postgres:Password12!@localhost:5432/postgres --schemaName ecommerce --directory src/crud/db/__generated__",
"crud:start": "ts-node -r tsconfig-paths/register ./src/crud/index.ts",
"eventsourced:recreate": "docker-compose kill & docker-compose down -v & docker-compose up -d & npm run eventsourced:setup & docker ps",
"eventsourced:recreate": "docker compose kill & docker compose down -v & docker compose up -d & npm run eventsourced:setup & docker ps",
"eventsourced:setup": "run-s eventsourced:migrate eventsourced:generate",
"eventsourced:generate": "npx @databases/pg-schema-cli --database postgres://postgres:Password12!@localhost:5432/postgres --schemaName ecommerce --directory src/eventsourced/db/__generated__",
"eventsourced:migrate": "pg-migrations apply --database postgres://postgres:Password12!@localhost:5432/postgres --directory ./src/eventsourced/migrations/ --ignore-error migration_file_edited",
Expand Down
4 changes: 2 additions & 2 deletions workshops/introduction_to_event_sourcing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ Follow the instructions in exercises folders.

## Ensuring that all is setup correctly

1. Run: `docker-compose up` to start EventStoreDB docker image.
1. Run: `docker compose up` to start EventStoreDB docker image.
2. Run `npm run test:solved`. If all is fine then all tests should be green.

## Running

1. Run: `docker-compose up` to start EventStoreDB docker image.You should automatically get EventStoreDB UI: http://localhost:2113/
1. Run: `docker compose up` to start EventStoreDB docker image.You should automatically get EventStoreDB UI: http://localhost:2113/
2. You can get build watch by running `npm run build:ts:watch`.
3. To run test for exercises run `npm run test:exercise`. For solutions run `npm run test:solved`, for all `npm run test`.
4. Whe you're working with exercise and want to have tests running on file change run `npm run test:exercise:watch`.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Using a defined structure of events from the [first exercise](../01_events_defin

## Prerequisites

Run [docker-compose](../docker-compose.yml) script from the main workshop repository to start EventStoreDB instance.
Run [docker compose](../docker-compose.yml) script from the main workshop repository to start EventStoreDB instance.

```shell
docker-compose up
docker compose up
```

After that you can use EventStoreDB UI to see how streams and events look like. It's available at: http://localhost:2113/.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Having the following shopping cart process:

And business logic implemented in the [previous exercise](../05_business_logic/) write the application code that will _glue_ the API defined in `api.ts` files with the domain code.

This time you'll use EventStoreDB instead of the mocked one. Run `docker-compose up` before running test code to have database set up.
This time you'll use EventStoreDB instead of the mocked one. Run `docker compose up` before running test code to have database set up.

There are four variations:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ And business logic and application code implemented in the [previous exercise](.
- [MDN - HTTP conditional requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests)
- [EventStoreDB Documentation - Handling concurrency](https://developers.eventstore.com/clients/grpc/appending-events.html#handling-concurrency)

This time you'll use EventStoreDB instead of the mocked one. Run `docker-compose up` before running test code to have database set up.
This time you'll use EventStoreDB instead of the mocked one. Run `docker compose up` before running test code to have database set up.

There are four variations:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Using a defined structure of events from the [first exercise](../01_events_defin

## Prerequisites

Run [docker-compose](../docker-compose.yml) script from the main workshop repository to start EventStoreDB instance.
Run [docker compose](../docker-compose.yml) script from the main workshop repository to start EventStoreDB instance.

```shell
docker-compose up
docker compose up
```

After that you can use EventStoreDB UI to see how streams and events look like. It's available at: http://localhost:2113/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Having the following shopping cart process:

And business logic implemented in the [previous exercise](../05_business_logic/) write the application code that will _glue_ the API defined in `api.ts` files with the domain code.

This time you'll use EventStoreDB instead of the mocked one. Run `docker-compose up` before running test code to have database set up.
This time you'll use EventStoreDB instead of the mocked one. Run `docker compose up` before running test code to have database set up.

There are four variations:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ And business logic and application code implemented in the [previous exercise](.
- [MDN - HTTP conditional requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests)
- [EventStoreDB Documentation - Handling concurrency](https://developers.eventstore.com/clients/grpc/appending-events.html#handling-concurrency)

This time you'll use EventStoreDB instead of the mocked one. Run `docker-compose up` before running test code to have database set up.
This time you'll use EventStoreDB instead of the mocked one. Run `docker compose up` before running test code to have database set up.

There are four variations:

Expand Down

0 comments on commit b2bd369

Please sign in to comment.