Modify getting started doc to integrate http.#Wait, fix doc dependency issue
Signed-off-by: guillaume <guillaume.derouville@gmail.com>
This commit is contained in:
parent
84952b1725
commit
475e47de09
@ -3,6 +3,7 @@ package todoapp
|
||||
import (
|
||||
"alpha.dagger.io/dagger"
|
||||
"alpha.dagger.io/docker"
|
||||
"alpha.dagger.io/http"
|
||||
)
|
||||
|
||||
// docker local socket
|
||||
@ -24,10 +25,16 @@ registry: docker.#Run & {
|
||||
socket: dockerSocket
|
||||
}
|
||||
|
||||
// As we pushed the registry to our local docker
|
||||
// we need to wait for the container to be up
|
||||
wait: http.#Wait & {
|
||||
url: "localhost:5042"
|
||||
}
|
||||
|
||||
// push to our local registry
|
||||
// this concrete value satisfies the string constraint
|
||||
// we defined in the previous file
|
||||
push: target: "localhost:5042/todoapp"
|
||||
push: target: "\(wait.url)/todoapp"
|
||||
|
||||
// Application URL
|
||||
appURL: "http://localhost:8080/" & dagger.#Output
|
||||
|
@ -2,9 +2,9 @@ package todoapp
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/dagger"
|
||||
"alpha.dagger.io/os"
|
||||
"alpha.dagger.io/docker"
|
||||
"alpha.dagger.io/js/yarn"
|
||||
"alpha.dagger.io/os"
|
||||
)
|
||||
|
||||
// Build the source code using Yarn
|
||||
|
@ -72,3 +72,15 @@ _No input._
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*statusCode* | `string` |- |
|
||||
|*body* | `string` |- |
|
||||
|
||||
## http.#Wait
|
||||
|
||||
URL listener Creates a dependency on URL
|
||||
|
||||
### http.#Wait Inputs
|
||||
|
||||
_No input._
|
||||
|
||||
### http.#Wait Outputs
|
||||
|
||||
_No output._
|
||||
|
@ -18,12 +18,12 @@ TestRun: docker.#Run & {
|
||||
name: "daggerci-test-wait-\(TestSuffix.out)"
|
||||
ref: "nginx"
|
||||
socket: TestDockersocket
|
||||
ports: ["8080:80"]
|
||||
ports: ["8088:80"]
|
||||
}
|
||||
|
||||
// Waits for TestRun to finish initializing
|
||||
Testhealth: #Wait & {
|
||||
url: "http://localhost:8080/"
|
||||
url: "http://localhost:8088/"
|
||||
}
|
||||
|
||||
TestWait: query: os.#Container & {
|
||||
|
Reference in New Issue
Block a user