This commit is contained in:
2025-08-14 19:30:32 -07:00
parent 689d5d4f37
commit e35c31215b
6 changed files with 19 additions and 20 deletions

20
.gitignore vendored
View File

@@ -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
View File

@@ -0,0 +1,5 @@
FROM alpine
WORKDIR /app
COPY noteserver .
RUN chmod +x /app/noteserver
CMD ["/app/noteserver"]

7
create.sql Normal file
View 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
View 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

Binary file not shown.

2
reload.sh Normal file
View File

@@ -0,0 +1,2 @@
sqlite3 db/notes.db < create.sql