From e4acc2efe99b2d4b14bcdcd7e8d3df789bdccda1 Mon Sep 17 00:00:00 2001 From: crisnicandrei <62384997+crisnicandrei@users.noreply.github.com> Date: Tue, 8 Jul 2025 07:10:27 +0300 Subject: [PATCH 1/2] Add Font awesome token to the docker file --- .dockerignore | 2 ++ .env.template | 1 + .npmrc.template | 2 ++ Dockerfile.local | 9 +++++++-- README.md | 14 ++++++++++---- 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 .dockerignore create mode 100644 .npmrc.template diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..91f59937b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +# .dockerignore +.npmrc diff --git a/.env.template b/.env.template index 246d793a2..5e7153b6b 100644 --- a/.env.template +++ b/.env.template @@ -1,3 +1,4 @@ GOOGLE_API_KEY="apiKey" FIREBASE_API_KEY="apiKey" STRIPE_API_KEY="apiKey" +FONTAWESOME_PACKAGE_TOKEN="fontawesomePackageToken \ No newline at end of file diff --git a/.npmrc.template b/.npmrc.template new file mode 100644 index 000000000..a70f22bef --- /dev/null +++ b/.npmrc.template @@ -0,0 +1,2 @@ +@fortawesome:registry=https://npm.fontawesome.com/ +//npm.fontawesome.com/:_authToken=${FONTAWESOME_PACKAGE_TOKEN} \ No newline at end of file diff --git a/Dockerfile.local b/Dockerfile.local index b54967c74..ff4df92a4 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -6,5 +6,10 @@ ENV FONTAWESOME_PACKAGE_TOKEN=${FONTAWESOME_PACKAGE_TOKEN} COPY web-app/ /usr/app WORKDIR /usr/app -RUN set -eux \ - && npm ci +COPY web-app/.npmrc.template .npmrc.template + +RUN set -eux; \ + apk add --no-cache gettext; \ + envsubst < .npmrc.template > .npmrc; \ + npm ci --legacy-peer-deps; \ + rm .npmrc \ No newline at end of file diff --git a/README.md b/README.md index 9d18f5a54..5257a386f 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,17 @@ cp .env.template .env Add your environment secrets to `.env`. -You need access to FontAwesome Pro packages to install dependencies. You can install the project dependencies with: -```sh -FONTAWESOME_PACKAGE_TOKEN="insert_token_here" npm install -``` +### ✅ With something like this: + +```md +You need access to FontAwesome Pro packages to install dependencies. + +1. Add your FontAwesome token to `.env`: + +```env +FONTAWESOME_PACKAGE_TOKEN=your_token_here + Then run the app using `npm run dev` to point the dev server against your `local.permanent.org` VM accessible at `https://ng.permanent.org:4200` From ab60d1e58a3a383bffa7340cad30b7383d303789 Mon Sep 17 00:00:00 2001 From: crisnicandrei <62384997+crisnicandrei@users.noreply.github.com> Date: Wed, 9 Jul 2025 17:14:35 +0300 Subject: [PATCH 2/2] export FA token in .env.template --- .dockerignore | 2 -- .env.template | 2 +- .npmrc.template | 2 -- Dockerfile.local | 9 ++------- README.md | 8 ++------ 5 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .npmrc.template diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 91f59937b..000000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -# .dockerignore -.npmrc diff --git a/.env.template b/.env.template index 5e7153b6b..f6c258de7 100644 --- a/.env.template +++ b/.env.template @@ -1,4 +1,4 @@ GOOGLE_API_KEY="apiKey" FIREBASE_API_KEY="apiKey" STRIPE_API_KEY="apiKey" -FONTAWESOME_PACKAGE_TOKEN="fontawesomePackageToken \ No newline at end of file +export FONTAWESOME_PACKAGE_TOKEN="fontawesomePackageToken" diff --git a/.npmrc.template b/.npmrc.template deleted file mode 100644 index a70f22bef..000000000 --- a/.npmrc.template +++ /dev/null @@ -1,2 +0,0 @@ -@fortawesome:registry=https://npm.fontawesome.com/ -//npm.fontawesome.com/:_authToken=${FONTAWESOME_PACKAGE_TOKEN} \ No newline at end of file diff --git a/Dockerfile.local b/Dockerfile.local index ff4df92a4..b54967c74 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -6,10 +6,5 @@ ENV FONTAWESOME_PACKAGE_TOKEN=${FONTAWESOME_PACKAGE_TOKEN} COPY web-app/ /usr/app WORKDIR /usr/app -COPY web-app/.npmrc.template .npmrc.template - -RUN set -eux; \ - apk add --no-cache gettext; \ - envsubst < .npmrc.template > .npmrc; \ - npm ci --legacy-peer-deps; \ - rm .npmrc \ No newline at end of file +RUN set -eux \ + && npm ci diff --git a/README.md b/README.md index 5257a386f..203f4e544 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,13 @@ cp .env.template .env Add your environment secrets to `.env`. - -### ✅ With something like this: - -```md You need access to FontAwesome Pro packages to install dependencies. 1. Add your FontAwesome token to `.env`: ```env FONTAWESOME_PACKAGE_TOKEN=your_token_here - +``` Then run the app using `npm run dev` to point the dev server against your `local.permanent.org` VM accessible at `https://ng.permanent.org:4200` @@ -65,4 +61,4 @@ This project uses [Storybook.](https://storybook.js.org/) Run `npm run storybook ## History -This project was initially generated by [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8. +This project was initially generated by [Angular CLI](https://github.com/angular/angular-cli) version 6.0.