diff --git a/Dockerfile b/Dockerfile index e08a1d8..d28f165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ FROM node:16-alpine3.16 WORKDIR /usr/lib/timetender COPY . . +RUN npm install --legacy-peer-deps \ + && npm run build \ + && rm -rf node_modules RUN npm install --omit=dev --legacy-peer-deps \ && npm install dos2unix -g \ - && dos2unix /usr/lib/timetender/init/init.sh + && dos2unix /usr/lib/timetender/bin/init.sh EXPOSE 8080 -CMD [ "sh", "/usr/lib/timetender/init/init.sh" ] \ No newline at end of file +CMD [ "sh", "/usr/lib/timetender/bin/init.sh" ] \ No newline at end of file diff --git a/README.md b/README.md index b0e5538..43a887b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-

Timetender v0.1.1

+

Timetender v0.1.2

GitHub DockerHub Quay.io diff --git a/bin/docker_windev_n16bs.bat b/bin/docker_windev_n16bs.bat new file mode 100644 index 0000000..bf17642 --- /dev/null +++ b/bin/docker_windev_n16bs.bat @@ -0,0 +1,2 @@ +set host_path=%cd%\..\ +docker run -it --rm -v %host_path%:/docker_dev -w /docker_dev node:16-bullseye bash \ No newline at end of file diff --git a/bin/docker_windev_n16bs_p3000.bat b/bin/docker_windev_n16bs_p3000.bat new file mode 100644 index 0000000..ab4d18c --- /dev/null +++ b/bin/docker_windev_n16bs_p3000.bat @@ -0,0 +1,2 @@ +set host_path=%cd%\..\ +docker run -it --rm -p 3000:3000 -v %host_path%:/docker_dev -w /docker_dev node:16-bullseye bash \ No newline at end of file diff --git a/bin/docker_windev_n16bs_p8080.bat b/bin/docker_windev_n16bs_p8080.bat new file mode 100644 index 0000000..0c6b8f5 --- /dev/null +++ b/bin/docker_windev_n16bs_p8080.bat @@ -0,0 +1,2 @@ +set host_path=%cd%\..\ +docker run -it --rm -p 8080:8080 -v %host_path%:/docker_dev -w /docker_dev node:16-bullseye bash \ No newline at end of file diff --git a/bin/init.sh b/bin/init.sh new file mode 100644 index 0000000..5de3ec7 --- /dev/null +++ b/bin/init.sh @@ -0,0 +1,19 @@ +if [ ! -f /usr/lib/timetender/config/timetender.json ]; then + cp /usr/lib/timetender/bin/init/config/timetender.json /usr/lib/timetender/config/timetender.json +fi +if [ ! -f /usr/lib/timetender/data/data.json ]; then + cp /usr/lib/timetender/bin/init/data/data.json /usr/lib/timetender/data/data.json +fi +if [ ! -f /usr/lib/timetender/data/data_auto-save.json ]; then + cp /usr/lib/timetender/bin/init/data/data_auto-save.json /usr/lib/timetender/data/data_auto-save.json +fi +if [ ! -f /usr/lib/timetender/data/event.json ]; then + cp /usr/lib/timetender/bin/init/data/event.json /usr/lib/timetender/data/event.json +fi +if [ ! -f /usr/lib/timetender/data/tag.json ]; then + cp /usr/lib/timetender/bin/init/data/tag.json /usr/lib/timetender/data/tag.json +fi +node /usr/lib/timetender/server.js + + + diff --git a/bin/init/config/timetender.json b/bin/init/config/timetender.json new file mode 100644 index 0000000..094c0e8 --- /dev/null +++ b/bin/init/config/timetender.json @@ -0,0 +1,5 @@ +[ + { + "version": "0.1.2" + } +] \ No newline at end of file diff --git a/init/data/data.json b/bin/init/data/data.json similarity index 100% rename from init/data/data.json rename to bin/init/data/data.json diff --git a/init/data/data_auto-save.json b/bin/init/data/data_auto-save.json similarity index 100% rename from init/data/data_auto-save.json rename to bin/init/data/data_auto-save.json diff --git a/init/data/event.json b/bin/init/data/event.json similarity index 100% rename from init/data/event.json rename to bin/init/data/event.json diff --git a/init/data/tag.json b/bin/init/data/tag.json similarity index 100% rename from init/data/tag.json rename to bin/init/data/tag.json diff --git a/config/timetender.json b/config/timetender.json index 61ac627..094c0e8 100644 --- a/config/timetender.json +++ b/config/timetender.json @@ -1,5 +1,5 @@ [ { - "version": "0.1.1" + "version": "0.1.2" } ] \ No newline at end of file diff --git a/init/config/timetender.json b/init/config/timetender.json deleted file mode 100644 index 61ac627..0000000 --- a/init/config/timetender.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "version": "0.1.1" - } -] \ No newline at end of file diff --git a/init/init.sh b/init/init.sh deleted file mode 100644 index 805777b..0000000 --- a/init/init.sh +++ /dev/null @@ -1,19 +0,0 @@ -if [ ! -f /usr/lib/timetender/config/timetender.json ]; then - cp /usr/lib/timetender/init/config/timetender.json /usr/lib/timetender/config/timetender.json -fi -if [ ! -f /usr/lib/timetender/data/data.json ]; then - cp /usr/lib/timetender/init/data/data.json /usr/lib/timetender/data/data.json -fi -if [ ! -f /usr/lib/timetender/data/data_auto-save.json ]; then - cp /usr/lib/timetender/init/data/data_auto-save.json /usr/lib/timetender/data/data_auto-save.json -fi -if [ ! -f /usr/lib/timetender/data/event.json ]; then - cp /usr/lib/timetender/init/data/event.json /usr/lib/timetender/data/event.json -fi -if [ ! -f /usr/lib/timetender/data/tag.json ]; then - cp /usr/lib/timetender/init/data/tag.json /usr/lib/timetender/data/tag.json -fi -node /usr/lib/timetender/server.js - - - diff --git a/package.json b/package.json index 1879f38..d480884 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Timetender", - "version": "0.1.1", + "version": "0.1.2", "homepage": ".", "private": true, "scripts": { diff --git a/src/component/TopBar.js b/src/component/TopBar.js index b0f060e..d6fad9e 100644 --- a/src/component/TopBar.js +++ b/src/component/TopBar.js @@ -24,7 +24,7 @@ class TopBar extends React.Component { return ( <>
-

Timetender v0.1.1

+

Timetender v0.1.2

) diff --git a/src/component/Windows-Setting.js b/src/component/Windows-Setting.js index 1013651..f13f1f0 100644 --- a/src/component/Windows-Setting.js +++ b/src/component/Windows-Setting.js @@ -28,7 +28,7 @@ export default class Setting extends React.Component { backgroundColor: '#fff', }} /> -

Timetender v0.1.1

+

Timetender v0.1.2

GitHub@TitanRGB

https://github.com/TitanRGB/Timetender

Copyright © 2022-present Timetender