From 72169206f81bdb184874f0604e9f1695467679ca Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 7 Dec 2019 14:26:44 -0700 Subject: [PATCH] Make dockerfile and fix multitag filter --- Dockerfile | 17 +++++++++++++++++ entrypoint.sh | 9 +++++++++ server/ajax/task/task.go | 2 +- testdata/migrate.sh | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 Dockerfile create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..ce16f91 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM frolvlad/alpine-glibc:alpine-3.9_glibc-2.29 +RUN apk update \ + && apk add --no-cache \ + ca-certificates \ + git \ + bash \ + php php-sqlite3 php-pdo php-pdo_mysql php-json php-pdo_sqlite + +RUN mkdir -p /var/log +WORKDIR /main + +COPY . . + +ENV GOPATH="" +ENV MNT="/mnt/" +ENTRYPOINT ["/bin/bash", "/main/entrypoint.sh"] +CMD [] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..dc58858 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +( + pushd /main/testdata/mytinytodo* + php -S 0.0.0.0:38808 + kill -9 1 +) & + +exec /main/exec-todo-server "$@" diff --git a/server/ajax/task/task.go b/server/ajax/task/task.go index 5b17e25..4196697 100755 --- a/server/ajax/task/task.go +++ b/server/ajax/task/task.go @@ -103,7 +103,7 @@ func (t *Task) MarshalJSON() ([]byte, error) { "noteText": strings.Join(t.Note, "\n"), "ow": 0, "tags": strings.Join([]string(t.Tags), ", "), - "tags_ids": strings.Join([]string(tagsIds), ", "), + "tags_ids": strings.Join([]string(tagsIds), ","), "duedate": t.Due.Format(fullFormat), "dueClass": "", "dueStr": t.Due.Format(shortFormat), diff --git a/testdata/migrate.sh b/testdata/migrate.sh index 9450171..613205b 100644 --- a/testdata/migrate.sh +++ b/testdata/migrate.sh @@ -106,5 +106,6 @@ function add_task() { } if [ "$0" == "$BASH_SOURCE" ]; then + echo bash migrate.sh 192.168.0.86:44112 localhost:39909 time main "$@" fi