Skip to content

Commit 4379d02

Browse files
authored
Merge pull request #146 from HSLdevcom/revert-143-dependency-updates
Revert "removed forever, added dep review and codeql workflows"
2 parents 8abb6f1 + 95175fd commit 4379d02

File tree

6 files changed

+1454
-964
lines changed

6 files changed

+1454
-964
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/dependecy-scan.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

Dockerfile

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
FROM node:20-bookworm-slim
22

3-
RUN set -eux; \
4-
apt-get update; \
5-
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6-
ca-certificates curl gnupg wget pdftk fontconfig fonts-liberation supervisor; \
7-
install -d -m 0755 /etc/apt/keyrings; \
8-
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg; \
9-
chmod a+r /etc/apt/keyrings/google-chrome.gpg; \
10-
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list; \
11-
apt-get update; \
12-
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends google-chrome-stable libxss1; \
13-
rm -rf /var/lib/apt/lists/*
14-
3+
# This installs the necessary libs to make the bundled version of Chromium that Pupppeteer installs work
4+
RUN apt-get update \
5+
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq wget curl gnupg pdftk fontconfig fonts-liberation ca-certificates --no-install-recommends \
6+
# This installs the necessary libs to make the bundled version of Chromium that Puppeteer installs work
7+
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
8+
&& sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' \
9+
&& apt-get update \
10+
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq google-chrome-stable libxss1 --no-install-recommends \
11+
&& wget -O azcopy_v10.tar.gz https://aka.ms/downloadazcopy-v10-linux && tar -xf azcopy_v10.tar.gz --strip-components=1 && rm azcopy_v10.tar.gz \
12+
&& mv ./azcopy /usr/bin/ \
13+
&& rm -rf /var/lib/apt/lists/*
1514

1615
ENV WORK=/opt/publisher
1716
# ENV NODE_ENV production # Cannot use until devdependency list is fixed in package.json
@@ -29,13 +28,18 @@ COPY . ${WORK}
2928

3029
ARG BUILD_ENV=prod
3130
COPY .env.${BUILD_ENV} ${WORK}/.env
32-
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
3331

3432
ARG DIGITRANSIT_APIKEY
3533
ENV DIGITRANSIT_APIKEY=${DIGITRANSIT_APIKEY}
3634
RUN yarn build
3735

3836
EXPOSE 4000
3937

40-
CMD ./fonts.sh && fc-cache -f -v && exec supervisord -c /etc/supervisor/conf.d/supervisord.conf
41-
38+
CMD \
39+
./fonts.sh && \
40+
fc-cache -f -v && \
41+
yarn run forever start -c "yarn serve" dist/ && \
42+
yarn run forever start -c "yarn server" ./ && \
43+
yarn run forever start -c "yarn worker" ./ && \
44+
sleep 3 && \
45+
yarn run forever -f logs 1

docker/supervisord.conf

Lines changed: 0 additions & 34 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"apollo-link-http": "^1.2.0",
8080
"bullmq": "^1.86.2",
8181
"dotenv": "^8.0.0",
82+
"forever": "^4.0.3",
8283
"fs-extra": "^8.1.0",
8384
"graphql": "^0.11.7",
8485
"graphql-tag": "^2.5.0",

0 commit comments

Comments
 (0)