Skip to content

Commit

Permalink
Configured Grace.Server to create container on dotnet publish; delete…
Browse files Browse the repository at this point in the history
…d Dockerfile.
  • Loading branch information
ScottArbeit committed Oct 30, 2023
1 parent 6af61e2 commit f8eafef
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 37 deletions.
10 changes: 6 additions & 4 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project>
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<PublishProfile>DefaultContainer</PublishProfile>
</PropertyGroup>
</Project>
33 changes: 0 additions & 33 deletions src/Dockerfile

This file was deleted.

14 changes: 14 additions & 0 deletions src/Grace.Actors/Interfaces.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,22 @@ module Interfaces =
| OutOfRange
| Exception of ExceptionResponse

/// This is an experimental interface to explore how to back up and rehydrate actor instances.
[<Interface>]
type IExportable<'T> =
//abstract member Export: unit -> Task<Result<IList<RepositoryEvent>, ExportError>>
//abstract member Import: IList<RepositoryEvent> -> Task<Result<bool, ImportError>>
abstract member Export: unit -> Task<Result<List<'T>, ExportError>>
abstract member Import: IList<'T> -> Task<Result<int, ImportError>>

/// This is an experimental interface to explore how to implement important management functions for actors.
[<Interface>]
type IRevertable<'T> =
abstract member EventCount: unit -> Task<int>
abstract member RevertToInstant: Instant -> PersistAction -> Task<Result<'T, RevertError>>
abstract member RevertBack: int -> PersistAction -> Task<Result<'T, RevertError>>

/// Defines the operations for the Branch actor.
[<Interface>]
type IBranchActor =
inherit IActor
Expand All @@ -62,6 +65,7 @@ module Interfaces =
/// Retrieves the parent branch for a given branch.
abstract member GetParentBranch: unit -> Task<BranchDto>

/// Defines the operations for the BranchName actor.
[<Interface>]
type IBranchNameActor =
inherit IActor
Expand All @@ -70,6 +74,7 @@ module Interfaces =
/// Returns the BranchId for the given BranchName.
abstract member GetBranchId: unit -> Task<string option>

/// Defines the operations for the Commit actor.
[<Interface>]
type IContainerNameActor =
inherit IActor
Expand All @@ -78,6 +83,7 @@ module Interfaces =
/// The container name is $"{ownerName}-{organizationName}-{repositoryName}".
abstract member GetContainerName: unit -> Task<Result<ContainerName, string>>

/// Defines the operations for the Diff actor.
[<Interface>]
type IDiffActor =
inherit IActor
Expand All @@ -86,6 +92,7 @@ module Interfaces =
/// Gets the results of the diff.
abstract member GetDiff: unit -> Task<DiffDto>

///Defines the operations for the DirectoryVersion actor.
[<Interface>]
type IDirectoryVersionActor =
inherit IActor
Expand All @@ -112,6 +119,7 @@ module Interfaces =
/// Delete the DirectoryVersion and all subdirectories and files.
abstract member Delete: correlationId: string -> Task<GraceResult<string>>

///Defines the operations for the Organization actor.
[<Interface>]
type IOrganizationActor =
inherit IActor
Expand All @@ -128,6 +136,7 @@ module Interfaces =
/// Validates incoming commands and converts them to events that are stored in the database.
abstract member Handle: command: Organization.OrganizationCommand -> eventMetadata: EventMetadata -> Task<GraceResult<string>>

/// Defines the operations for the OrganizationName actor.
[<Interface>]
type IOrganizationNameActor =
inherit IActor
Expand All @@ -136,6 +145,7 @@ module Interfaces =
/// Returns the OrganizationId for the given OrganizationName.
abstract member GetOrganizationId: unit -> Task<string option>

/// Defines the operations for the Owner actor.
[<Interface>]
type IOwnerActor =
inherit IActor
Expand All @@ -152,6 +162,7 @@ module Interfaces =
/// Validates incoming commands and converts them to events that are stored in the database.
abstract member Handle : command: Owner.OwnerCommand -> eventMetadata: EventMetadata -> Task<GraceResult<string>>

/// Defines the operations fpr the OwnerName actor.
[<Interface>]
type IOwnerNameActor =
inherit IActor
Expand All @@ -160,6 +171,7 @@ module Interfaces =
/// Returns the OwnerId for the given OwnerName.
abstract member GetOwnerId: unit -> Task<string option>

/// Defines the operations for the Reference actor.
[<Interface>]
type IReferenceActor =
inherit IActor
Expand All @@ -175,6 +187,7 @@ module Interfaces =
-> Task<ReferenceDto>
abstract member Delete: correlationId: string -> Task<GraceResult<string>>

/// Defines the operations for the Repository actor.
[<Interface>]
type IRepositoryActor =
inherit IActor
Expand All @@ -191,6 +204,7 @@ module Interfaces =
/// Processes commands by checking that they're valid, and then converting them into events.
abstract member Handle : command: Repository.RepositoryCommand -> eventMetadata: EventMetadata -> Task<GraceResult<string>>

/// Defines the operations for the RepositoryName actor.
[<Interface>]
type IRepositoryNameActor =
inherit IActor
Expand Down
2 changes: 2 additions & 0 deletions src/Grace.Server/Grace.Server.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<Version>0.1</Version>
<Description>The server module for Grace Version Control System.</Description>
<UserSecretsId>f1167a88-7f15-49c3-8ea1-30c2608081c9</UserSecretsId>
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:8.0</ContainerBaseImage>
<ContainerRepository>scottarbeit/grace-server</ContainerRepository>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileTag>scottarbeit/grace-server</DockerfileTag>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
Expand Down

0 comments on commit f8eafef

Please sign in to comment.