Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed docker-compose to docker compose to fix the GH Action build
Browse files Browse the repository at this point in the history
oskardudycz committed Sep 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 419849c commit 81b5341
Showing 19 changed files with 54 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.dotnet.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Start containers
run: docker-compose --profile ci up -d
run: docker compose --profile ci up -d

- name: Setup .NET
uses: actions/setup-dotnet@v4
@@ -36,4 +36,4 @@ jobs:

- name: Stop containers
if: always()
run: docker-compose --profile ci down
run: docker compose --profile ci down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -629,7 +629,7 @@ For running the Event Store examples you need to have:
2. [Docker](https://store.docker.com/search?type=edition&offering=community) installed. Then going to the `docker` folder and running:

```
docker-compose --profile all up
docker compose --profile all up
```

**More information about using .NET, WebApi and Docker you can find in my other tutorials:** [WebApi with .NET](https://github.com/oskardudycz/WebApiWith.NETCore)
8 changes: 4 additions & 4 deletions Sample/ECommerce/README.md
Original file line number Diff line number Diff line change
@@ -16,13 +16,13 @@
10. Open `PracticalEventSourcing.sln` solution.
11. Docker useful commands

- `docker-compose up` - start dockers
- `docker-compose kill` - to stop running dockers.
- `docker-compose down -v` - to clean stopped dockers.
- `docker compose up` - start dockers
- `docker compose kill` - to stop running dockers.
- `docker compose down -v` - to clean stopped dockers.
- `docker ps` - for showing running dockers
- `docker ps -a` - to show all dockers (also stopped)

12. Go to [docker](./docker) and run: `docker-compose up`.
12. Go to [docker](./docker) and run: `docker compose up`.
13. Wait until all dockers got are downloaded and running.
14. You should automatically get:
- Postgres DB running
8 changes: 4 additions & 4 deletions Sample/EventStoreDB/ECommerce/README.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ Sample is showing the typical flow of the Event Sourcing app with [EventStoreDB]

## Running

1. Go to [docker](./docker) and run: `docker-compose up`.
1. Go to [docker](./docker) and run: `docker compose up`.
2. Wait until all dockers got are downloaded and running.
3. You should automatically get:
- EventStoreDB UI (for event store): http://localhost:2113/
@@ -66,9 +66,9 @@ It uses:
## Trivia

1. Docker useful commands
- `docker-compose up` - start dockers
- `docker-compose kill` - to stop running dockers.
- `docker-compose down -v` - to clean stopped dockers.
- `docker compose up` - start dockers
- `docker compose kill` - to stop running dockers.
- `docker compose down -v` - to clean stopped dockers.
- `docker ps` - for showing running dockers
- `docker ps -a` - to show all dockers (also stopped)

2 changes: 1 addition & 1 deletion Sample/EventStoreDB/Simple/README.md
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ API integration tests for:

## Running

1. Go to [docker](./docker) and run: `docker-compose up`.
1. Go to [docker](./docker) and run: `docker compose up`.
2. Wait until all dockers got are downloaded and running.
3. You should automatically get:
- EventStoreDB UI (for event store): http://localhost:2113/
2 changes: 1 addition & 1 deletion Sample/Helpdesk/Helpdesk.Api/Dockerfile
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ RUN dotnet restore ./${project_name}.csproj
COPY ./ ./

# Run code generation depending on the build argument
RUN if [ "${run_codegen}" = true ] ; then dotnet run -- codegen write & dotnet run -- codegen test; else echo "skipping code generation"; fi
RUN dotnet run -- codegen write & dotnet run -- codegen test

RUN ls
RUN ls -R Internal
21 changes: 16 additions & 5 deletions Sample/Helpdesk/Helpdesk.Api/Program.cs
Original file line number Diff line number Diff line change
@@ -11,10 +11,12 @@
using JasperFx.CodeGeneration;
using Marten;
using Marten.AspNetCore;
using Marten.Events;
using Marten.Events.Daemon.Resiliency;
using Marten.Events.Projections;
using Marten.Pagination;
using Marten.Schema.Identity;
using Marten.Storage;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
@@ -44,15 +46,24 @@

options.UseSystemTextJsonForSerialization(EnumStorage.AsString);

options.Events.TenancyStyle = TenancyStyle.Conjoined;
options.Policies.AllDocumentsAreMultiTenanted();

options.Events.StreamIdentity = StreamIdentity.AsString;
options.Events.MetadataConfig.HeadersEnabled = true;
options.Events.MetadataConfig.CausationIdEnabled = true;
options.Events.MetadataConfig.CorrelationIdEnabled = true;


options.Projections.Errors.SkipApplyErrors = false;
options.Projections.Errors.SkipSerializationErrors = false;
options.Projections.Errors.SkipUnknownEvents = false;

options.Projections.LiveStreamAggregation<Incident>();
options.Projections.Add<IncidentHistoryTransformation>(ProjectionLifecycle.Inline);
options.Projections.Add<IncidentDetailsProjection>(ProjectionLifecycle.Inline);
options.Projections.Add<IncidentShortInfoProjection>(ProjectionLifecycle.Inline);
options.Projections.Add<CustomerIncidentsSummaryProjection>(ProjectionLifecycle.Async);
// options.Projections.LiveStreamAggregation<Incident>();
// options.Projections.Add<IncidentHistoryTransformation>(ProjectionLifecycle.Inline);
// options.Projections.Add<IncidentDetailsProjection>(ProjectionLifecycle.Inline);
// options.Projections.Add<IncidentShortInfoProjection>(ProjectionLifecycle.Inline);
// options.Projections.Add<CustomerIncidentsSummaryProjection>(ProjectionLifecycle.Async);

options.ApplicationAssembly = typeof(CustomerIncidentsSummaryProjection).Assembly;

2 changes: 1 addition & 1 deletion Sample/Helpdesk/Helpdesk.Api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ services:
project_name: Helpdesk.Api
run_codegen: true
deploy:
replicas: 3
replicas: 1
depends_on:
postgres:
condition: service_healthy
6 changes: 3 additions & 3 deletions Sample/MeetingsManagement/Readme.md
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@
9. Open `MeetingsManagement.sln` solution.
10. Docker useful commands

- `docker-compose up` - start dockers
- `docker-compose kill` - to stop running dockers.
- `docker-compose down -v` - to clean stopped dockers.
- `docker compose up` - start dockers
- `docker compose kill` - to stop running dockers.
- `docker compose down -v` - to clean stopped dockers.
- `docker ps` - for showing running dockers
- `docker ps -a` - to show all dockers (also stopped)

8 changes: 4 additions & 4 deletions Workshops/BuildYourOwnEventStore/Readme.md
Original file line number Diff line number Diff line change
@@ -39,13 +39,13 @@ and read:
10. Open `BuildYourOwnEventStore.sln` solution.
11. Docker useful commands

- `docker-compose up` - start dockers
- `docker-compose kill` - to stop running dockers.
- `docker-compose down -v` - to clean stopped dockers.
- `docker compose up` - start dockers
- `docker compose kill` - to stop running dockers.
- `docker compose down -v` - to clean stopped dockers.
- `docker ps` - for showing running dockers
- `docker ps -a` - to show all dockers (also stopped)

12. For the first part of workshop please go to [./docker](./docker) and run: `docker-compose up`.
12. For the first part of workshop please go to [./docker](./docker) and run: `docker compose up`.
13. Wait until all dockers got are downloaded and running.
14. You should automatically get:

Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
Using a defined structure of events from the [first exercise](../01-EventsDefinition), fill a `AppendEvents` function to store events in [Marten](https://martendb.io).

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

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

After that you can use PG Admin (IDE for Postgres) to see how tables and data look like. It's available at: http://localhost:5050.
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
Using a defined structure of events from the [first exercise](../01-EventsDefinition), fill a `AppendEvents` function to store events in [EventStoreDB](https://developers.eventstore.com/clients/grpc/).

## 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
@@ -11,10 +11,10 @@ There are two variations:
Select your preferred approach (or both) to solve this use case. If needed you can modify entities or events.

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

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

After that you can use PG Admin (IDE for Postgres) to see how tables and data look like. It's available at: http://localhost:5050.
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@ There are two variations:
Select your preferred approach (or both) to solve this use case. If needed you can modify entities or events.

## 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/.
2 changes: 1 addition & 1 deletion Workshops/IntroductionToEventSourcing/README.md
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ Read also more in my article [Introduction to Event Sourcing - Self Paced Kit](h

## Running

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 running for [Marten storage](https://martendb.io)
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
Using a defined structure of events from the [first exercise](../01-EventsDefinition), fill a `AppendEvents` function to store events in [Marten](https://martendb.io).

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

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

After that you can use PG Admin (IDE for Postgres) to see how tables and data look like. It's available at: http://localhost:5050.
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
Using a defined structure of events from the [first exercise](../01-EventsDefinition), fill a `AppendEvents` function to store events in [EventStoreDB](https://developers.eventstore.com/clients/grpc/).

## 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
@@ -11,10 +11,10 @@ There are two variations:
Select your preferred approach (or both) to solve this use case. If needed you can modify entities or events.

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

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

After that you can use PG Admin (IDE for Postgres) to see how tables and data look like. It's available at: http://localhost:5050.
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@ There are two variations:
Select your preferred approach (or both) to solve this use case. If needed you can modify entities or events.

## 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/.

0 comments on commit 81b5341

Please sign in to comment.