fucking go module system
This commit is contained in:
parent
6e2437dbdd
commit
4e1c629ff3
@ -3,12 +3,12 @@ RUN mkdir -p /go/src/folder
|
|||||||
WORKDIR /go/src/folder
|
WORKDIR /go/src/folder
|
||||||
COPY /src .
|
COPY /src .
|
||||||
|
|
||||||
RUN go get -d
|
RUN go get -u ./...
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o main .
|
RUN go build
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY --from=builder /go/src/folder/main .
|
COPY --from=builder /go/src/folder/weatherservice .
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD ["/main"]
|
CMD ["/weatherservice"]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"../config"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"joethei.xyz/weather/config"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
3
src/client/go.mod
Normal file
3
src/client/go.mod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module client
|
||||||
|
|
||||||
|
go 1.14
|
1
src/config/go.mod
Normal file
1
src/config/go.mod
Normal file
@ -0,0 +1 @@
|
|||||||
|
module config
|
@ -1,9 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"./config"
|
|
||||||
"./server"
|
|
||||||
"github.com/getsentry/sentry-go"
|
"github.com/getsentry/sentry-go"
|
||||||
|
"joethei.xyz/weather/config"
|
||||||
|
"joethei.xyz/weather/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"../client"
|
|
||||||
"../config"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/auth0/go-jwt-middleware"
|
"github.com/auth0/go-jwt-middleware"
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
@ -14,6 +12,8 @@ import (
|
|||||||
"github.com/throttled/throttled/store/memstore"
|
"github.com/throttled/throttled/store/memstore"
|
||||||
"github.com/victorspringer/http-cache"
|
"github.com/victorspringer/http-cache"
|
||||||
"github.com/victorspringer/http-cache/adapter/memory"
|
"github.com/victorspringer/http-cache/adapter/memory"
|
||||||
|
"joethei.xyz/weather/client"
|
||||||
|
"joethei.xyz/weather/config"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
13
src/server/go.mod
Normal file
13
src/server/go.mod
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
module server
|
||||||
|
|
||||||
|
go 1.14
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/auth0/go-jwt-middleware v0.0.0-20200507191422-d30d7b9ece63 // indirect
|
||||||
|
github.com/getsentry/sentry-go v0.6.1 // indirect
|
||||||
|
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||||
|
github.com/justinas/alice v1.2.0 // indirect
|
||||||
|
github.com/justinas/nosurf v1.1.0 // indirect
|
||||||
|
github.com/throttled/throttled v2.2.4+incompatible // indirect
|
||||||
|
github.com/victorspringer/http-cache v0.0.0-20190721184638-fe78e97af707 // indirect
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user