From 796305950214c629ea2046d5ce2969ee07d1f7fb Mon Sep 17 00:00:00 2001 From: bronkuu Date: Thu, 14 May 2026 14:32:21 +0200 Subject: [PATCH] docker cd --- .dockerignore | 5 +++++ .idea/runConfigurations/Docker_compose.xml | 11 +++++++++++ .idea/runConfigurations/Dockerfile.xml | 11 +++++++++++ docker-compose.yml | 1 + main.go | 8 +++++--- 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 .dockerignore create mode 100644 .idea/runConfigurations/Docker_compose.xml create mode 100644 .idea/runConfigurations/Dockerfile.xml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2efdba5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +resources +todo.txt +.gitignore +docker-compose.yml +Dockerfiles \ No newline at end of file diff --git a/.idea/runConfigurations/Docker_compose.xml b/.idea/runConfigurations/Docker_compose.xml new file mode 100644 index 0000000..692927a --- /dev/null +++ b/.idea/runConfigurations/Docker_compose.xml @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Dockerfile.xml b/.idea/runConfigurations/Dockerfile.xml new file mode 100644 index 0000000..d4555f9 --- /dev/null +++ b/.idea/runConfigurations/Dockerfile.xml @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d6cbeab..9cca72a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,6 @@ services: app: + container_name: piekarnikgosipl build: . ports: - "8000:8000" diff --git a/main.go b/main.go index 4de889d..bf53bd6 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,8 @@ package main import ( + "fmt" "html/template" - "log" "net/http" "os" ) @@ -32,8 +32,10 @@ func generateHTML() { } func main() { + fmt.Println("generating html") os.MkdirAll("www/styles", 0777) generateHTML() + fmt.Println("generating css") t, err := template.ParseGlob(`templates/styles/*.css`) if err != nil { panic(err) @@ -47,6 +49,6 @@ func main() { if err != nil { panic(err) } - - log.Fatal(http.ListenAndServe(":8000", http.FileServer(http.Dir("www")))) + fmt.Println("listening on :8000") + panic(http.ListenAndServe(":8000", http.FileServer(http.Dir("www")))) }