From 5db5eed03684c92cfccc80ea9ce83e367ed6ba78 Mon Sep 17 00:00:00 2001 From: Dave Kobrenski Date: Wed, 22 Mar 2023 15:14:44 -0400 Subject: [PATCH 1/7] fix for GitHub save not working --- .eslintrc.js | 3 ++- server/renderer/Dockerfile | 10 +++++----- webpack.config.js | 3 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9f866d6..48477a9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,8 @@ module.exports = { "env": { "browser": true, - "es6": true + "es6": true, + "node": true }, "settings": { "react": { diff --git a/server/renderer/Dockerfile b/server/renderer/Dockerfile index 9a81b1b..3cf6c35 100644 --- a/server/renderer/Dockerfile +++ b/server/renderer/Dockerfile @@ -1,5 +1,5 @@ -FROM debian:sid-slim -RUN apt-get update && apt-get install --no-install-recommends -y ruby curl bzip2 git locales gsfonts ghostscript fonts-dejavu-extra psmisc emacs-intl-fonts xfonts-intl-.* fonts-ipafont-mincho xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi patch python2 python3 && \ +FROM --platform=linux/amd64 debian:sid-slim +RUN apt-get update && apt-get install --no-install-recommends -y adduser ruby curl bzip2 git locales gsfonts ghostscript fonts-dejavu-extra psmisc emacs-intl-fonts xfonts-intl-.* fonts-ipafont-mincho xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi patch python3 && \ localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 > /usr/local/bin/jq && \ chmod +x /usr/local/bin/jq && echo 42 | jq . @@ -17,9 +17,9 @@ RUN adduser --disabled-password --gecos '' r && \ cd ~r/.lyp && \ patch -p0 < /tmp/no_lyp_check_update.patch && \ rm /tmp/no_lyp_check_update.patch && \ - su r -c "source ~/.profile; lyp install lilypond@2.22.1 lys;" && \ - rm /home/r/.lyp/lilyponds/2.22.1/etc/relocate/gs.reloc && \ - rm /home/r/.lyp/lilyponds/2.22.1/bin/gs && \ + su r -c "source ~/.profile; lyp install lilypond@2.24.1 lys;" && \ + rm /home/r/.lyp/lilyponds/2.24.1/etc/relocate/gs.reloc && \ + rm /home/r/.lyp/lilyponds/2.24.1/bin/gs && \ chown r -R /tmp/* && \ chown nobody -R /home/r/.lyp/* RUN apt-get remove -y curl patch && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* diff --git a/webpack.config.js b/webpack.config.js index 93122a0..0ce07cb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -66,6 +66,9 @@ module.exports = { plugins: [ new CopyPlugin({ patterns: [path.resolve(__dirname, "static")] }), new MonacoWebpackPlugin(), + new webpack.DefinePlugin({ + 'process.env': JSON.stringify(process.env) + }), new webpack.EnvironmentPlugin([ "REACT_APP_GITHUB_CLIENT_ID", "REACT_APP_BACKEND_WS_URL", From cf08fd1e85a69dbe6cadb6d94cda20c66e5e7bf5 Mon Sep 17 00:00:00 2001 From: Dave Kobrenski Date: Wed, 22 Mar 2023 15:40:24 -0400 Subject: [PATCH 2/7] updated readme --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 339bb2f..9e0e1b5 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,29 @@ git clone https://github.com/emilyskidsister/hacklily.git Once you have installed the above dependencies, run ```bash -make serve +yarn install +yarn build +yarn start +``` + +Or if using npm: + +```bash +npm install +npm run build +npm start +``` + +In either case, to use the remote backend (instead of building your own local version), instead of running the `start` command, use: + +```bash +yarn start:remote-backend +``` + +or: + +```bash +npm run start:remote-backend ``` ### Running (with GitHub integration) From d9866131f940b896ad174076da667b82dee1b40f Mon Sep 17 00:00:00 2001 From: Dave Kobrenski Date: Wed, 22 Mar 2023 15:43:12 -0400 Subject: [PATCH 3/7] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e0e1b5..85cc355 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ npm run build npm start ``` -In either case, to use the remote backend (instead of building your own local version), instead of running the `start` command, use: +To use the remote backend (rather than building your own local renderer), **in place of the `start` command**, use: ```bash yarn start:remote-backend From bf1974dc04b2c57463f3f0d63c7398836a1d0340 Mon Sep 17 00:00:00 2001 From: Dave Kobrenski Date: Wed, 22 Mar 2023 15:45:14 -0400 Subject: [PATCH 4/7] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85cc355..d6d4c9c 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ If you specifically wish to test integration with GitHub, follow the steps in th First, create a GitHub organization by following the steps at https://github.com/organizations/new. Select the free plan. -Next, create a new app at https://github.com/organizations//settings/applications, +Next, create a new app at https://github.com/organizations/your-new-repo-name/settings/applications, making note of the client ID and secret. This application will be used to allow users to log in. To run the frontend, in one shell run: From 7b4724355e72ef72a6e9a59a111da02ce5a6fdd3 Mon Sep 17 00:00:00 2001 From: Dave Kobrenski Date: Wed, 22 Mar 2023 16:03:29 -0400 Subject: [PATCH 5/7] updated readme and fix for GitHub saving --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6d4c9c..7cdfc41 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ git clone https://github.com/emilyskidsister/hacklily.git ### Running (without GitHub integration) -Once you have installed the above dependencies, run +Once you have installed the above dependencies, run: ```bash yarn install From a4e7b44a04d8d6beb729a23ff416a3c5cb7faea1 Mon Sep 17 00:00:00 2001 From: Dave Kobrenski Date: Wed, 22 Mar 2023 16:33:12 -0400 Subject: [PATCH 6/7] dockerfile - use lilypond 2.23.6 --- server/renderer/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/renderer/Dockerfile b/server/renderer/Dockerfile index 3cf6c35..7f1d8f6 100644 --- a/server/renderer/Dockerfile +++ b/server/renderer/Dockerfile @@ -17,9 +17,9 @@ RUN adduser --disabled-password --gecos '' r && \ cd ~r/.lyp && \ patch -p0 < /tmp/no_lyp_check_update.patch && \ rm /tmp/no_lyp_check_update.patch && \ - su r -c "source ~/.profile; lyp install lilypond@2.24.1 lys;" && \ - rm /home/r/.lyp/lilyponds/2.24.1/etc/relocate/gs.reloc && \ - rm /home/r/.lyp/lilyponds/2.24.1/bin/gs && \ + su r -c "source ~/.profile; lyp install lilypond@2.23.6 lys;" && \ + rm /home/r/.lyp/lilyponds/2.23.6/etc/relocate/gs.reloc && \ + rm /home/r/.lyp/lilyponds/2.23.6/bin/gs && \ chown r -R /tmp/* && \ chown nobody -R /home/r/.lyp/* RUN apt-get remove -y curl patch && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* From 6c8bc6fb2cf28cc1491a9def405e6226585efa5b Mon Sep 17 00:00:00 2001 From: Dave Kobrenski Date: Wed, 22 Mar 2023 16:58:23 -0400 Subject: [PATCH 7/7] revert to lilypond 2.22.1 for now --- server/renderer/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/renderer/Dockerfile b/server/renderer/Dockerfile index 7f1d8f6..360b961 100644 --- a/server/renderer/Dockerfile +++ b/server/renderer/Dockerfile @@ -17,9 +17,9 @@ RUN adduser --disabled-password --gecos '' r && \ cd ~r/.lyp && \ patch -p0 < /tmp/no_lyp_check_update.patch && \ rm /tmp/no_lyp_check_update.patch && \ - su r -c "source ~/.profile; lyp install lilypond@2.23.6 lys;" && \ - rm /home/r/.lyp/lilyponds/2.23.6/etc/relocate/gs.reloc && \ - rm /home/r/.lyp/lilyponds/2.23.6/bin/gs && \ + su r -c "source ~/.profile; lyp install lilypond@2.22.1 lys;" && \ + rm /home/r/.lyp/lilyponds/2.22.1/etc/relocate/gs.reloc && \ + rm /home/r/.lyp/lilyponds/2.22.1/bin/gs && \ chown r -R /tmp/* && \ chown nobody -R /home/r/.lyp/* RUN apt-get remove -y curl patch && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*