Skip to content

Commit

Permalink
Merge branch 'main' into feat/ojoi-application-additional-state
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbjarnio authored Oct 28, 2024
2 parents e7ead51 + f799ad2 commit 7fc8990
Show file tree
Hide file tree
Showing 7 changed files with 567 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ RUN bin/elasticsearch-plugin install analysis-icu
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN yum -y install unzip wget
# hadolint ignore=DL3033
RUN yum -y install unzip wget && \
yum clean all

# get dictionaries
RUN wget -O master.zip https://github.com/island-is/elasticsearch-dictionaries/archive/master.zip
Expand Down
27 changes: 14 additions & 13 deletions infra/scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
ARG DOCKER_IMAGE_REGISTRY=public.ecr.aws
ARG NODE_IMAGE_TAG
FROM ${DOCKER_IMAGE_REGISTRY}/docker/library/node:${NODE_IMAGE_TAG} as runner
FROM ${DOCKER_IMAGE_REGISTRY}/docker/library/node:${NODE_IMAGE_TAG} AS runner

RUN apk add postgresql-client bash
# hadolint ignore=DL3018
RUN apk add --no-cache postgresql-client bash

FROM ${DOCKER_IMAGE_REGISTRY}/docker/library/node:${NODE_IMAGE_TAG} as build
FROM ${DOCKER_IMAGE_REGISTRY}/docker/library/node:${NODE_IMAGE_TAG} AS build
WORKDIR /app/infra

ENV NODE_OPTIONS=--openssl-legacy-provider

ADD infra/package.json infra/yarn.lock /app/infra/
COPY infra/package.json infra/yarn.lock /app/infra/
COPY .yarn/ ./.yarn
WORKDIR /app/infra
RUN yarn install --immutable

ADD infra/ /app/infra/
ADD apps /app/apps/
ADD libs /app/libs/
COPY infra/ /app/infra/
COPY apps /app/apps/
COPY libs /app/libs/

RUN ./node_modules/.bin/ncc build src/feature-env.ts -o /app/dist/feature-env
RUN ./node_modules/.bin/ncc build src/secrets.ts -o /app/dist/secrets
RUN ./node_modules/.bin/ncc build src/feature-env.ts -o /app/dist/feature-env && \
./node_modules/.bin/ncc build src/secrets.ts -o /app/dist/secrets

FROM runner
WORKDIR /app

COPY --from=build /app/dist/ /app
COPY infra/scripts/container-scripts/* ./app/
COPY infra/scripts/update-package-json.ts ./app/
WORKDIR /app
COPY infra/scripts/container-scripts/* /app/
COPY infra/scripts/update-package-json.ts /app/

ENTRYPOINT [ "node", "feature-env" ]
Loading

0 comments on commit 7fc8990

Please sign in to comment.