Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f45a94622e |
@@ -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 ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
COPY *.go ./
|
COPY src/*.go ./
|
||||||
COPY seed.sql ./
|
COPY src/seed.sql ./
|
||||||
|
|
||||||
ENV CGO_ENABLED=1
|
ENV CGO_ENABLED=1
|
||||||
RUN go build -o server .
|
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,
|
// 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 {
|
func (app *dbStruct) Seed() error {
|
||||||
_, err := app.db.Exec(seedSQL)
|
_, err := app.db.Exec(seedSQL)
|
||||||
return err
|
return err
|
||||||
Reference in New Issue
Block a user