docker cd
This commit is contained in:
parent
dfc3ee3b96
commit
7963059502
5 changed files with 33 additions and 3 deletions
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
resources
|
||||||
|
todo.txt
|
||||||
|
.gitignore
|
||||||
|
docker-compose.yml
|
||||||
|
Dockerfiles
|
||||||
11
.idea/runConfigurations/Docker_compose.xml
generated
Normal file
11
.idea/runConfigurations/Docker_compose.xml
generated
Normal 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
11
.idea/runConfigurations/Dockerfile.xml
generated
Normal 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>
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
|
container_name: piekarnikgosipl
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|
|
||||||
8
main.go
8
main.go
|
|
@ -1,8 +1,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
@ -32,8 +32,10 @@ func generateHTML() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
fmt.Println("generating html")
|
||||||
os.MkdirAll("www/styles", 0777)
|
os.MkdirAll("www/styles", 0777)
|
||||||
generateHTML()
|
generateHTML()
|
||||||
|
fmt.Println("generating css")
|
||||||
t, err := template.ParseGlob(`templates/styles/*.css`)
|
t, err := template.ParseGlob(`templates/styles/*.css`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
@ -47,6 +49,6 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
fmt.Println("listening on :8000")
|
||||||
log.Fatal(http.ListenAndServe(":8000", http.FileServer(http.Dir("www"))))
|
panic(http.ListenAndServe(":8000", http.FileServer(http.Dir("www"))))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue