Skip to content
Snippets Groups Projects
Commit 4d70da0b authored by Dmytro Bogatov's avatar Dmytro Bogatov :two_hearts:
Browse files

Try.

parent 5e624f0a
Branches
No related tags found
No related merge requests found
Pipeline #
......@@ -161,6 +161,14 @@ move-static-files () {
chmod -x documentation/out/deploy.sh
}
build-ping-server () {
cd $CWD/ping
echo "Building ping server..."
go build -o bin/ping main/main.go
}
build-dev-client () {
cd $CWD
......@@ -207,6 +215,9 @@ build-docker-images () {
echo "Building nginx-$DOTNET_TAG"
docker build -f nginx/Dockerfile -t dbogatov/status-site:nginx-$DOTNET_TAG nginx/
echo "Building ping-$DOTNET_TAG"
docker build -f ping/Dockerfile -t dbogatov/status-site:ping-$DOTNET_TAG ping/
echo "Done!"
}
......@@ -228,6 +239,9 @@ push-docker-images () {
echo "Pushing nginx-$DOTNET_TAG"
docker push dbogatov/status-site:nginx-$DOTNET_TAG
echo "Pushing ping-$DOTNET_TAG"
docker push dbogatov/status-site:ping-$DOTNET_TAG
echo "Done!"
}
......
FROM golang:alpine
# Create directory for the app source code
WORKDIR /srv
# Copy the binary
COPY bin/ping /srv
# Indicate the binary as our entrypoint
ENTRYPOINT /srv/ping
# Expose your port
EXPOSE 8888
......@@ -32,8 +32,7 @@ func main() {
w.Header().Set("Content-Type", "application/json")
// url := r.URL.Query().Get("url");
url := "http://localhost:5555"
url := r.URL.Query().Get("url")
method := r.URL.Query().Get("method")
timeout, timeoutConversionErr := strconv.Atoi(r.URL.Query().Get("timeout"))
......@@ -111,7 +110,7 @@ func main() {
w.Write(data)
})
log.Fatal(http.ListenAndServe(":8000", nil))
log.Fatal(http.ListenAndServe(":8888", nil))
}
func sendError(w *http.ResponseWriter, error error, response response) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment