From a392c0c66d8a5bc39d7358c2021c815bea262d77 Mon Sep 17 00:00:00 2001 From: Chris Grimmett Date: Fri, 12 Apr 2024 11:25:44 -0800 Subject: [PATCH] successful docker build of strapi --- Tiltfile | 2 +- charts/fp/templates-staging/external-dns.yaml | 25 +++++++++++++++++++ charts/fp/templates/external-dns.yaml | 0 strapi.dockerfile | 14 +++++++++-- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 charts/fp/templates-staging/external-dns.yaml delete mode 100644 charts/fp/templates/external-dns.yaml diff --git a/Tiltfile b/Tiltfile index 9393387..9472abb 100644 --- a/Tiltfile +++ b/Tiltfile @@ -11,7 +11,7 @@ docker_build( 'fp/strapi', '.', dockerfile='strapi.dockerfile', - target='dev', + target='release', live_update=[ sync('./packages/strapi', '/app') ] diff --git a/charts/fp/templates-staging/external-dns.yaml b/charts/fp/templates-staging/external-dns.yaml new file mode 100644 index 0000000..1702917 --- /dev/null +++ b/charts/fp/templates-staging/external-dns.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: external-dns +spec: + strategy: + type: Recreate + selector: + matchLabels: + app: external-dns + template: + metadata: + labels: + app: external-dns + spec: + containers: + - name: external-dns + image: registry.k8s.io/external-dns/external-dns:v0.14.1 + args: + - --source=service # ingress is also possible + - --domain-filter=example.com # (optional) limit to only example.com domains; change to match the zone created above. + - --provider=vultr + env: + - name: VULTR_API_KEY + value: "VULTR_API_KEY" \ No newline at end of file diff --git a/charts/fp/templates/external-dns.yaml b/charts/fp/templates/external-dns.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/strapi.dockerfile b/strapi.dockerfile index e22c82b..c8c2676 100644 --- a/strapi.dockerfile +++ b/strapi.dockerfile @@ -7,12 +7,22 @@ RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev l FROM base AS install COPY ./packages/strapi/pnpm-lock.yaml ./packages/strapi/package.json ./ -RUN pnpm install +RUN pnpm install --prod --shamefully-hoist && pnpm run build COPY ./packages/strapi . -RUN pnpm run build RUN chown -R node:node /app USER node + +# FROM base AS install +# COPY ./packages/strapi/pnpm-lock.yaml ./ +# RUN pnpm fetch --prod +# COPY ./packages/strapi . +# RUN pnpm i --offline --prod --shamefully-hoist && pnpm run build +# RUN chown -R node:node /app +# USER node + + + FROM install AS dev ENV NODE_ENV=development ENTRYPOINT ["pnpm"]