ok i think this good :3
This commit is contained in:
38
.gitignore
vendored
38
.gitignore
vendored
@@ -1,34 +1,26 @@
|
|||||||
# ---> Go
|
# Allowlisting gitignore template for GO projects prevents us
|
||||||
# If you prefer the allow list template instead of the deny list, see community template:
|
# from adding various unwanted local files, such as generated
|
||||||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
# files, developer configurations or IDE-specific files etc.
|
||||||
#
|
#
|
||||||
# Binaries for programs and plugins
|
# Recommended: Go.AllowList.gitignore
|
||||||
*.exe
|
|
||||||
*.exe~
|
|
||||||
*.dll
|
|
||||||
*.so
|
|
||||||
*.dylib
|
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Ignore everything
|
||||||
*.test
|
*
|
||||||
|
|
||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# But not these files...
|
||||||
*.out
|
!/.gitignore
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
!*.go
|
||||||
# vendor/
|
!go.sum
|
||||||
|
!go.mod
|
||||||
|
|
||||||
# Go workspace file
|
!docker-deploy.sh
|
||||||
go.work
|
!Dockerfile
|
||||||
go.work.sum
|
|
||||||
|
|
||||||
# env file
|
!README.md
|
||||||
.env
|
!LICENSE
|
||||||
|
|
||||||
# !Makefile
|
# !Makefile
|
||||||
|
|
||||||
# ...even if they are in subdirectories
|
# ...even if they are in subdirectories
|
||||||
!*/
|
!*/
|
||||||
|
|
||||||
# ---> Custom
|
|
||||||
db
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY noteserver .
|
COPY . .
|
||||||
RUN chmod +x /app/noteserver
|
RUN apk update && apk add go && go build .
|
||||||
CMD ["/app/noteserver"]
|
CMD ["./noteserver"]
|
||||||
|
@@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o noteserver .
|
|
||||||
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
echo "[#] sudo $0 $@"
|
||||||
|
exec sudo "$0" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
docker build -t noteserver .
|
docker build -t noteserver .
|
||||||
docker rm noteserver
|
docker rm noteserver
|
||||||
docker run -d -p 80:3000 --name noteserver noteserver
|
docker run -d -p 3002:3000 --name noteserver noteserver
|
||||||
|
BIN
noteserver
BIN
noteserver
Binary file not shown.
Reference in New Issue
Block a user