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/README.md b/README.md index 339bb2f..7cdfc41 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,32 @@ 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 -make serve +yarn install +yarn build +yarn start +``` + +Or if using npm: + +```bash +npm install +npm run build +npm start +``` + +To use the remote backend (rather than building your own local renderer), **in place of the `start` command**, use: + +```bash +yarn start:remote-backend +``` + +or: + +```bash +npm run start:remote-backend ``` ### Running (with GitHub integration) @@ -52,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: diff --git a/server/renderer/Dockerfile b/server/renderer/Dockerfile index 9a81b1b..360b961 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 . 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",