changed tree
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
root = "."
|
||||
tmp_dir = "tmp"
|
||||
|
||||
[build]
|
||||
cmd = "go build -o ./tmp/main ./src"
|
||||
bin = "./tmp/main"
|
||||
include_ext = ["go", "html", "sql", "css", "js"]
|
||||
include_dir = ["src", "templates", "static"]
|
||||
exclude_dir = ["tmp", "scrap", ".git", ".vscode"]
|
||||
delay = 1000
|
||||
stop_on_error = true
|
||||
|
||||
[misc]
|
||||
clean_on_exit = true
|
||||
+2
-2
@@ -8,8 +8,8 @@ WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY *.go ./
|
||||
COPY seed.sql ./
|
||||
COPY src/*.go ./
|
||||
COPY src/seed.sql ./
|
||||
|
||||
ENV CGO_ENABLED=1
|
||||
RUN go build -o server .
|
||||
|
||||
@@ -24,7 +24,6 @@ type dbStruct struct {
|
||||
}
|
||||
|
||||
// Seed runs the schema in seed.sql. Idempotent via CREATE TABLE IF NOT EXISTS,
|
||||
// so it's safe to call on every startup.
|
||||
func (app *dbStruct) Seed() error {
|
||||
_, err := app.db.Exec(seedSQL)
|
||||
return err
|
||||
Reference in New Issue
Block a user