Add hub directory with Dockerfile to build and stuff
parent
1e0086d29c
commit
f790bda8f4
|
@ -13,3 +13,11 @@ services:
|
|||
- PORT=8080
|
||||
- HUB_URL=http://hub:8080
|
||||
- TOPIC=a-topic
|
||||
|
||||
hub:
|
||||
build:
|
||||
context: ./hub
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./hub:/go/src/hub
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
FROM golang:1.15
|
||||
|
||||
RUN go get -u -v github.com/codeskyblue/fswatch
|
||||
|
||||
RUN mkdir -p /go/src/hub
|
||||
WORKDIR /go/src/hub
|
||||
|
||||
RUN echo "desc: Auto generated by fswatch [hubd] \n\
|
||||
triggers: \n\
|
||||
- name: '' \n\
|
||||
pattens: \n\
|
||||
- '**/*.go' \n\
|
||||
env: \n\
|
||||
DEBUG: '1' \n\
|
||||
cmd: go run /go/src/hub/*.go \n\
|
||||
shell: true \n\
|
||||
delay: 100ms \n\
|
||||
stop_timeout: 500ms \n\
|
||||
signal: KILL \n\
|
||||
kill_signal: '' \n\
|
||||
watch_paths: \n\
|
||||
- . \n\
|
||||
watch_depth: 10 \n\
|
||||
" >> /fsw.yml
|
||||
|
||||
CMD fswatch -config /fsw.yml
|
|
@ -0,0 +1,3 @@
|
|||
module git.elis.nu/etu/websubhub/hub
|
||||
|
||||
go 1.15
|
|
@ -0,0 +1,7 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello")
|
||||
}
|
Loading…
Reference in New Issue