added server docker image

This commit is contained in:
Askill 2022-09-17 14:29:19 +00:00
parent b82ebe2809
commit 6c8b090bae
4 changed files with 20 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,5 +1,4 @@
**/*.mod
**/*.sum
**/*.exe
# Byte-compiled / optimized / DLL files

12
server/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM golang:1.19
WORKDIR /usr/src/app
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -v -o /usr/local/bin/app
CMD ["app"]

5
server/go.mod Normal file
View File

@ -0,0 +1,5 @@
module githb.com/askill/r_place
go 1.19
require github.com/gorilla/websocket v1.5.0

2
server/go.sum Normal file
View File

@ -0,0 +1,2 @@
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=