diff --git a/.github/workflows/workshops_introduction_to_event_sourcing.yml b/.github/workflows/workshops_introduction_to_event_sourcing.yml index 72103bac..134ca92a 100644 --- a/.github/workflows/workshops_introduction_to_event_sourcing.yml +++ b/.github/workflows/workshops_introduction_to_event_sourcing.yml @@ -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 diff --git a/README.md b/README.md index bf3f7fa3..83bb7a34 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/samples/eventsVersioning/README.md b/samples/eventsVersioning/README.md index 70005711..6555d1e5 100644 --- a/samples/eventsVersioning/README.md +++ b/samples/eventsVersioning/README.md @@ -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`. diff --git a/samples/from_crud_to_eventsourcing/README.md b/samples/from_crud_to_eventsourcing/README.md index 93695c3f..b6a518cd 100644 --- a/samples/from_crud_to_eventsourcing/README.md +++ b/samples/from_crud_to_eventsourcing/README.md @@ -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 diff --git a/samples/from_crud_to_eventsourcing/package.json b/samples/from_crud_to_eventsourcing/package.json index 1b16509a..7e1c7c8d 100644 --- a/samples/from_crud_to_eventsourcing/package.json +++ b/samples/from_crud_to_eventsourcing/package.json @@ -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", diff --git a/samples/hotelManagement/README.md b/samples/hotelManagement/README.md index 70005711..6555d1e5 100644 --- a/samples/hotelManagement/README.md +++ b/samples/hotelManagement/README.md @@ -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`. diff --git a/samples/unpeelingOnion/package.json b/samples/unpeelingOnion/package.json index 1cd65c6b..c9decb01 100644 --- a/samples/unpeelingOnion/package.json +++ b/samples/unpeelingOnion/package.json @@ -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", diff --git a/workshops/introduction_to_event_sourcing/README.md b/workshops/introduction_to_event_sourcing/README.md index dca1274c..42257cee 100644 --- a/workshops/introduction_to_event_sourcing/README.md +++ b/workshops/introduction_to_event_sourcing/README.md @@ -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`. diff --git a/workshops/introduction_to_event_sourcing/src/03_appending_events_eventstoredb/README.md b/workshops/introduction_to_event_sourcing/src/03_appending_events_eventstoredb/README.md index 69476c69..c44dc766 100644 --- a/workshops/introduction_to_event_sourcing/src/03_appending_events_eventstoredb/README.md +++ b/workshops/introduction_to_event_sourcing/src/03_appending_events_eventstoredb/README.md @@ -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/. diff --git a/workshops/introduction_to_event_sourcing/src/06_application_logic_eventstoredb/README.md b/workshops/introduction_to_event_sourcing/src/06_application_logic_eventstoredb/README.md index 0ed60dae..2c7880e2 100644 --- a/workshops/introduction_to_event_sourcing/src/06_application_logic_eventstoredb/README.md +++ b/workshops/introduction_to_event_sourcing/src/06_application_logic_eventstoredb/README.md @@ -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: diff --git a/workshops/introduction_to_event_sourcing/src/07_optimistic_concurrency_eventstoredb/README.md b/workshops/introduction_to_event_sourcing/src/07_optimistic_concurrency_eventstoredb/README.md index da5de42a..723b9bee 100644 --- a/workshops/introduction_to_event_sourcing/src/07_optimistic_concurrency_eventstoredb/README.md +++ b/workshops/introduction_to_event_sourcing/src/07_optimistic_concurrency_eventstoredb/README.md @@ -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: diff --git a/workshops/introduction_to_event_sourcing/src/solved/03_appending_events_eventstoredb/README.md b/workshops/introduction_to_event_sourcing/src/solved/03_appending_events_eventstoredb/README.md index 84889e64..c670e1ce 100644 --- a/workshops/introduction_to_event_sourcing/src/solved/03_appending_events_eventstoredb/README.md +++ b/workshops/introduction_to_event_sourcing/src/solved/03_appending_events_eventstoredb/README.md @@ -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/. diff --git a/workshops/introduction_to_event_sourcing/src/solved/06_application_logic_eventstoredb/README.md b/workshops/introduction_to_event_sourcing/src/solved/06_application_logic_eventstoredb/README.md index 0ed60dae..2c7880e2 100644 --- a/workshops/introduction_to_event_sourcing/src/solved/06_application_logic_eventstoredb/README.md +++ b/workshops/introduction_to_event_sourcing/src/solved/06_application_logic_eventstoredb/README.md @@ -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: diff --git a/workshops/introduction_to_event_sourcing/src/solved/07_optimistic_concurrency_eventstoredb/README.md b/workshops/introduction_to_event_sourcing/src/solved/07_optimistic_concurrency_eventstoredb/README.md index 752699ca..8ed64f16 100644 --- a/workshops/introduction_to_event_sourcing/src/solved/07_optimistic_concurrency_eventstoredb/README.md +++ b/workshops/introduction_to_event_sourcing/src/solved/07_optimistic_concurrency_eventstoredb/README.md @@ -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: