buhh
This commit is contained in:
20
.gitignore
vendored
20
.gitignore
vendored
@@ -25,26 +25,6 @@ go.work.sum
|
||||
# env file
|
||||
.env
|
||||
|
||||
# ---> Go.AllowList
|
||||
# Allowlisting gitignore template for GO projects prevents us
|
||||
# from adding various unwanted local files, such as generated
|
||||
# files, developer configurations or IDE-specific files etc.
|
||||
#
|
||||
# Recommended: Go.AllowList.gitignore
|
||||
|
||||
# Ignore everything
|
||||
*
|
||||
|
||||
# But not these files...
|
||||
!/.gitignore
|
||||
|
||||
!*.go
|
||||
!go.sum
|
||||
!go.mod
|
||||
|
||||
!README.md
|
||||
!LICENSE
|
||||
|
||||
# !Makefile
|
||||
|
||||
# ...even if they are in subdirectories
|
||||
|
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM alpine
|
||||
WORKDIR /app
|
||||
COPY noteserver .
|
||||
RUN chmod +x /app/noteserver
|
||||
CMD ["/app/noteserver"]
|
7
create.sql
Normal file
7
create.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DROP TABLE IF EXISTS notes;
|
||||
CREATE TABLE notes (
|
||||
id TEXT PRIMARY KEY,
|
||||
user TEXT,
|
||||
data TEXT
|
||||
);
|
||||
|
5
docker-deploy.sh
Executable file
5
docker-deploy.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o noteserver .
|
||||
docker build -t noteserver .
|
||||
docker rm noteserver
|
||||
docker run -d -p 80:3000 noteserver --name noteserver
|
BIN
noteserver
Executable file
BIN
noteserver
Executable file
Binary file not shown.
Reference in New Issue
Block a user