Skip to content

Commit aea03c5

Browse files
committed
Deployment: improve the docker specifications
1 parent 373effd commit aea03c5

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

ctor/GreenCaptchaBot.fs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@
22

33
open Fabricator.Core
44
open Fabricator.Resources.Files
5+
open Fabricator.Resources.Docker
56

67
let private hostConfigDirectory = "/opt/green-captcha-bot/"
7-
let private docker = docker {
8+
let private docker =
89
let version = "v1.15.1"
9-
fromSources <| sources {
10-
gitRepository "https://github.com/ImoutoChan/GreenCaptchaBot.git"
11-
reference $"tags/{version}"
10+
dockerContainer {
11+
Sources = {
12+
GitRepository = "https://github.com/ImoutoChan/GreenCaptchaBot.git"
13+
GitReference = $"tags/{version}"
14+
}
15+
DockerfilePath = "CaptchaBot/Dockerfile"
16+
Tag = version
17+
Name = "green-captcha-bot"
18+
Options = [|
19+
Volume(hostPath = hostConfigDirectory, containerPath = "/app/Configuration")
20+
|]
1221
}
13-
withDockerfile "CaptchaBot/Dockerfile"
14-
withTag version
15-
withName "green-captcha-bot"
16-
withVolume(hostPath = hostConfigDirectory, containerPath = "/app/Configuration")
17-
}
1822

1923
let private configFile = FileResource(templatedFile "GreenCaptchaBot.template.json", $"{hostConfigDirectory}/appsettings.json")
2024

ctor/Program.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ let private cluster mode =
1414
|]
1515

1616
let main (args: string[]): int =
17-
let cluster =
1817
EntryPoint.main args cluster

0 commit comments

Comments
 (0)