docker cd

This commit is contained in:
bronkuu 2026-05-14 14:32:21 +02:00
parent dfc3ee3b96
commit 7963059502
5 changed files with 33 additions and 3 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
resources
todo.txt
.gitignore
docker-compose.yml
Dockerfiles

View file

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Docker compose" type="docker-deploy" factoryName="docker-compose.yml" server-name="Podman">
<deployment type="docker-compose.yml">
<settings>
<option name="commandLineOptions" value="--build" />
<option name="sourceFilePath" value="docker-compose.yml" />
</settings>
</deployment>
<method v="2" />
</configuration>
</component>

11
.idea/runConfigurations/Dockerfile.xml generated Normal file
View file

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Podman">
<deployment type="dockerfile">
<settings>
<option name="containerName" value="" />
<option name="sourceFilePath" value="Dockerfile" />
</settings>
</deployment>
<method v="2" />
</configuration>
</component>

View file

@ -1,5 +1,6 @@
services:
app:
container_name: piekarnikgosipl
build: .
ports:
- "8000:8000"

View file

@ -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"))))
}