convert strapi to use pnpm
ci / build (push) Failing after 3m59s
Details
ci / build (push) Failing after 3m59s
Details
This commit is contained in:
parent
203cc91f31
commit
2d2f8ced9b
29
Makefile
29
Makefile
|
@ -1,15 +1,42 @@
|
||||||
include .env
|
include .env
|
||||||
|
|
||||||
|
|
||||||
|
all: minikube secrets tilt
|
||||||
|
|
||||||
|
tilt:
|
||||||
|
tilt up
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
kubectl delete secret link2cid --ignore-not-found
|
kubectl delete secret link2cid --ignore-not-found
|
||||||
kubectl create secret generic link2cid \
|
kubectl create secret generic link2cid \
|
||||||
--from-literal=apiKey=${LINK2CID_API_KEY}
|
--from-literal=apiKey=${LINK2CID_API_KEY}
|
||||||
|
|
||||||
kubectl delete secret vultr
|
kubectl delete secret vultr --ignore-not-found
|
||||||
kubectl create secret generic vultr \
|
kubectl create secret generic vultr \
|
||||||
--from-literal=vultr=${VULTR_CONTAINER_REGISTRY_USERNAME}
|
--from-literal=vultr=${VULTR_CONTAINER_REGISTRY_USERNAME}
|
||||||
|
|
||||||
|
kubectl delete secret strapi --ignore-not-found
|
||||||
|
kubectl create secret generic strapi \
|
||||||
|
--from-literal=adminJwtSecret=${STRAPI_ADMIN_JWT_SECRET} \
|
||||||
|
--from-literal=apiTokenSalt=${STRAPI_API_TOKEN_SALT} \
|
||||||
|
--from-literal=appKeys=${APP_KEYS} \
|
||||||
|
--from-literal=databaseUrl=postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME} \
|
||||||
|
--from-literal=jwtSecret=${STRAPI_JWT_SECRET} \
|
||||||
|
--from-literal=muxPlaybackRestrictionId=${MUX_PLAYBACK_RESTRICTION_ID} \
|
||||||
|
--from-literal=muxSigningKeyPrivateKey=${MUX_SIGNING_KEY_PRIVATE_KEY} \
|
||||||
|
--from-literal=s3UscBucketApplicationKey=${S3_USC_BUCKET_APPLICATION_KEY} \
|
||||||
|
--from-literal=s3UscBucketEndpoint=${S3_USC_BUCKET_ENDPOINT} \
|
||||||
|
--from-literal=s3UscBucketName=${S3_USC_BUCKET_NAME} \
|
||||||
|
--from-literal=s3UscBucketKeyId=${S3_USC_BUCKET_KEY_ID} \
|
||||||
|
--from-literal=s3UscBucketRegion=${S3_USC_BUCKET_REGION} \
|
||||||
|
--from-literal=muxSigningKeyId=${MUX_SIGNING_KEY_ID} \
|
||||||
|
--from-literal=strapiAdminEmail=${STRAPI_ADMIN_EMAIL} \
|
||||||
|
--from-literal=sendgridApiKey=${SENDGRID_API_KEY} \
|
||||||
|
--from-literal=cdnBucketUscUrl=${CDN_BUCKET_USC_URL} \
|
||||||
|
--from-literal=transferTokenSalt=${TRANSFER_TOKEN_SALT}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --from-literal=sessionSecret=$(SESSION_SECRET) \
|
# --from-literal=sessionSecret=$(SESSION_SECRET) \
|
||||||
# --from-literal=twitchClientId=$(TWITCH_CLIENT_ID) \
|
# --from-literal=twitchClientId=$(TWITCH_CLIENT_ID) \
|
||||||
|
|
18
Tiltfile
18
Tiltfile
|
@ -9,7 +9,9 @@ k8s_yaml(helm(
|
||||||
docker_build('fp/link2cid', './packages/link2cid')
|
docker_build('fp/link2cid', './packages/link2cid')
|
||||||
docker_build(
|
docker_build(
|
||||||
'fp/strapi',
|
'fp/strapi',
|
||||||
'./packages/strapi',
|
'.',
|
||||||
|
dockerfile='strapi.dockerfile',
|
||||||
|
target='dev',
|
||||||
live_update=[
|
live_update=[
|
||||||
sync('./packages/strapi', '/app')
|
sync('./packages/strapi', '/app')
|
||||||
]
|
]
|
||||||
|
@ -60,13 +62,13 @@ k8s_resource(
|
||||||
# port_forwards=['5050']
|
# port_forwards=['5050']
|
||||||
# )
|
# )
|
||||||
|
|
||||||
# k8s_resource(
|
k8s_resource(
|
||||||
# workload='strapi-pod',
|
workload='strapi-pod',
|
||||||
# port_forwards=['1337'],
|
port_forwards=['1337'],
|
||||||
# links=[
|
links=[
|
||||||
# link('http://localhost:1337/admin', 'Strapi Admin UI')
|
link('http://localhost:1337/admin', 'Strapi Admin UI')
|
||||||
# ]
|
]
|
||||||
# )
|
)
|
||||||
|
|
||||||
|
|
||||||
# v1alpha1.extension_repo(name='default', url='https://github.com/tilt-dev/tilt-extensions')
|
# v1alpha1.extension_repo(name='default', url='https://github.com/tilt-dev/tilt-extensions')
|
||||||
|
|
|
@ -13,27 +13,27 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: ADMIN_JWT_SECRET
|
key: adminJwtSecret
|
||||||
- name: API_TOKEN_SALT
|
- name: API_TOKEN_SALT
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: API_TOKEN_SALT
|
key: apiTokenSalt
|
||||||
- name: APP_KEYS
|
- name: APP_KEYS
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: APP_KEYS
|
key: appKeys
|
||||||
- name: DATABASE_URL
|
- name: DATABASE_URL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: DATABASE_URL
|
key: databaseUrl
|
||||||
- name: CDN_BUCKET_USC_URL
|
- name: CDN_BUCKET_USC_URL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: CDN_BUCKET_USC_URL
|
key: cdnBucketUscUrl
|
||||||
- name: DATABASE_CLIENT
|
- name: DATABASE_CLIENT
|
||||||
value: postgres
|
value: postgres
|
||||||
- name: DATABASE_HOST
|
- name: DATABASE_HOST
|
||||||
|
@ -44,61 +44,61 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: JWT_SECRET
|
key: jwtSecret
|
||||||
- name: MUX_PLAYBACK_RESTRICTION_ID
|
- name: MUX_PLAYBACK_RESTRICTION_ID
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: MUX_PLAYBACK_RESTRICTION_ID
|
key: muxPlaybackRestrictionId
|
||||||
- name: MUX_SIGNING_KEY_ID
|
- name: MUX_SIGNING_KEY_ID
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: MUX_SIGNING_KEY_ID
|
key: muxSigningKeyId
|
||||||
- name: MUX_SIGNING_KEY_PRIVATE_KEY
|
- name: MUX_SIGNING_KEY_PRIVATE_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: MUX_SIGNING_KEY_PRIVATE_KEY
|
key: muxSigningKeyPrivateKey
|
||||||
- name: NODE_ENV
|
- name: NODE_ENV
|
||||||
value: production
|
value: production
|
||||||
- name: S3_USC_BUCKET_APPLICATION_KEY
|
- name: S3_USC_BUCKET_APPLICATION_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: S3_USC_BUCKET_APPLICATION_KEY
|
key: s3UscBucketApplicationKey
|
||||||
- name: S3_USC_BUCKET_ENDPOINT
|
- name: S3_USC_BUCKET_ENDPOINT
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: S3_USC_BUCKET_ENDPOINT
|
key: s3UscBucketEndpoint
|
||||||
- name: S3_USC_BUCKET_KEY_ID
|
- name: S3_USC_BUCKET_KEY_ID
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: S3_USC_BUCKET_KEY_ID
|
key: s3UscBucketKeyId
|
||||||
- name: S3_USC_BUCKET_NAME
|
- name: S3_USC_BUCKET_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: S3_USC_BUCKET_NAME
|
key: s3UscBucketName
|
||||||
- name: S3_USC_BUCKET_REGION
|
- name: S3_USC_BUCKET_REGION
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: S3_USC_BUCKET_REGION
|
key: s3UscBucketRegion
|
||||||
- name: SENDGRID_API_KEY
|
- name: SENDGRID_API_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: SENDGRID_API_KEY
|
key: sendgridApiKey
|
||||||
- name: STRAPI_URL
|
- name: STRAPI_URL
|
||||||
value: {{ .Values.strapi.url }}
|
value: {{ .Values.strapi.url }}
|
||||||
- name: TRANSFER_TOKEN_SALT
|
- name: TRANSFER_TOKEN_SALT
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: strapi
|
name: strapi
|
||||||
key: TRANSFER_TOKEN_SALT
|
key: transferTokenSalt
|
||||||
- name: PORT
|
- name: PORT
|
||||||
value: "{{ .Values.strapi.port }}"
|
value: "{{ .Values.strapi.port }}"
|
||||||
resources:
|
resources:
|
|
@ -0,0 +1,9 @@
|
||||||
|
.tmp/
|
||||||
|
.cache/
|
||||||
|
.git/
|
||||||
|
.env
|
||||||
|
build/
|
||||||
|
node_modules/
|
||||||
|
# Ignoring folders that might be used in starter templates
|
||||||
|
data/
|
||||||
|
backup/
|
|
@ -1,28 +0,0 @@
|
||||||
# Creating multi-stage build for production
|
|
||||||
FROM node:18-alpine as build
|
|
||||||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev git > /dev/null 2>&1
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
|
|
||||||
WORKDIR /opt/
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
RUN yarn global add node-gyp
|
|
||||||
RUN yarn config set network-timeout 600000 -g && yarn install --production
|
|
||||||
ENV PATH /opt/node_modules/.bin:$PATH
|
|
||||||
WORKDIR /opt/app
|
|
||||||
COPY . .
|
|
||||||
RUN yarn build
|
|
||||||
|
|
||||||
# Creating final production image
|
|
||||||
FROM node:18-alpine
|
|
||||||
RUN apk add --no-cache vips-dev
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
WORKDIR /opt/
|
|
||||||
COPY --from=build /opt/node_modules ./node_modules
|
|
||||||
WORKDIR /opt/app
|
|
||||||
COPY --from=build /opt/app ./
|
|
||||||
ENV PATH /opt/node_modules/.bin:$PATH
|
|
||||||
|
|
||||||
RUN chown -R node:node /opt/app
|
|
||||||
USER node
|
|
||||||
EXPOSE 1337
|
|
||||||
CMD ["yarn", "start"]
|
|
|
@ -1,26 +0,0 @@
|
||||||
FROM node:18.16-alpine as base
|
|
||||||
RUN corepack enable
|
|
||||||
# Installing libvips-dev for sharp Compatibility
|
|
||||||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
|
|
||||||
ARG NODE_ENV=development
|
|
||||||
ENV NODE_ENV=${NODE_ENV}
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
|
|
||||||
FROM base AS build
|
|
||||||
COPY package.json pnpm-lock.yaml ./
|
|
||||||
# RUN yarn config set network-timeout 600000 -g && yarn install
|
|
||||||
RUN pnpm install --frozen-lockfile
|
|
||||||
COPY . .
|
|
||||||
ENV PATH=/app/node_modules/.bin:$PATH
|
|
||||||
RUN chown -R node:node /app
|
|
||||||
USER node
|
|
||||||
RUN pnpm run build
|
|
||||||
EXPOSE 1337
|
|
||||||
|
|
||||||
|
|
||||||
FROM build AS dev
|
|
||||||
CMD ["pnpm", "run", "dev"]
|
|
||||||
|
|
||||||
FROM build AS release
|
|
||||||
ENTRYPOINT ["pnpm", "run", "start"]
|
|
|
@ -1,31 +0,0 @@
|
||||||
# Creating multi-stage build for production
|
|
||||||
FROM node:18-alpine as build
|
|
||||||
ENV PNPM_HOME="/pnpm"
|
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
|
||||||
RUN corepack enable
|
|
||||||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev git > /dev/null 2>&1
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
WORKDIR /opt/
|
|
||||||
COPY package.json pnpm-lock.yaml ./
|
|
||||||
RUN pnpm install --prod
|
|
||||||
ENV PATH /opt/node_modules/.bin:$PATH
|
|
||||||
WORKDIR /opt/app
|
|
||||||
COPY . .
|
|
||||||
RUN pnpm run build
|
|
||||||
|
|
||||||
# Creating final production image
|
|
||||||
FROM node:18-alpine
|
|
||||||
ENV PNPM_HOME="/pnpm"
|
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
|
||||||
RUN corepack enable
|
|
||||||
RUN apk add --no-cache vips-dev
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
WORKDIR /opt/
|
|
||||||
COPY --from=build /opt/node_modules ./node_modules
|
|
||||||
WORKDIR /opt/app
|
|
||||||
COPY --from=build /opt/app ./
|
|
||||||
ENV PATH /opt/node_modules/.bin:$PATH
|
|
||||||
RUN chown -R node:node /opt/app
|
|
||||||
USER node
|
|
||||||
EXPOSE 1337
|
|
||||||
CMD ["pnpm", "start"]
|
|
|
@ -1,19 +0,0 @@
|
||||||
FROM node:18-alpine
|
|
||||||
# Installing libvips-dev for sharp Compatibility
|
|
||||||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev git
|
|
||||||
ARG NODE_ENV=development
|
|
||||||
ENV NODE_ENV=${NODE_ENV}
|
|
||||||
|
|
||||||
WORKDIR /opt/
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
RUN yarn global add node-gyp
|
|
||||||
RUN yarn config set network-timeout 600000 -g && yarn install
|
|
||||||
ENV PATH /opt/node_modules/.bin:$PATH
|
|
||||||
|
|
||||||
WORKDIR /opt/app
|
|
||||||
COPY . .
|
|
||||||
RUN chown -R node:node /opt/app
|
|
||||||
USER node
|
|
||||||
RUN ["yarn", "build"]
|
|
||||||
EXPOSE 1337
|
|
||||||
CMD ["yarn", "dev"]
|
|
|
@ -63,7 +63,7 @@
|
||||||
"react-router-dom": "5.3.4",
|
"react-router-dom": "5.3.4",
|
||||||
"react-test-renderer": "^17.0.2",
|
"react-test-renderer": "^17.0.2",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"sharp": "^0.32.6",
|
"sharp": "0.32.6",
|
||||||
"strapi-plugin-fuzzy-search": "^2.2.0",
|
"strapi-plugin-fuzzy-search": "^2.2.0",
|
||||||
"styled-components": "5.3.3",
|
"styled-components": "5.3.3",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
"uuid": false
|
"uuid": false
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.19.1 <=18.x.x",
|
"node": ">=14.19.1 <=19.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
},
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2,5 +2,5 @@ packages:
|
||||||
- 'packages/uppy'
|
- 'packages/uppy'
|
||||||
- 'packages/bot'
|
- 'packages/bot'
|
||||||
- 'packages/next'
|
- 'packages/next'
|
||||||
|
- 'packages/strapi'
|
||||||
|
|
||||||
# strapi is not on here because it's not compatible with pnpm
|
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
# FROM node:18-alpine
|
||||||
|
# # Installing libvips-dev for sharp Compatibility
|
||||||
|
# RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev git
|
||||||
|
# ARG NODE_ENV=development
|
||||||
|
# ENV NODE_ENV=${NODE_ENV}
|
||||||
|
|
||||||
|
# WORKDIR /opt/
|
||||||
|
# COPY ./packages/strapi/package.json ./packages/strapi/yarn.lock ./
|
||||||
|
# RUN yarn global add node-gyp
|
||||||
|
# RUN yarn config set network-timeout 600000 -g && yarn install
|
||||||
|
# ENV PATH /opt/node_modules/.bin:$PATH
|
||||||
|
|
||||||
|
# WORKDIR /opt/app
|
||||||
|
# COPY ./packages/strapi .
|
||||||
|
# RUN chown -R node:node /opt/app
|
||||||
|
# USER node
|
||||||
|
# RUN ["yarn", "build"]
|
||||||
|
# EXPOSE 1337
|
||||||
|
# CMD ["yarn", "dev"]
|
||||||
|
|
||||||
|
FROM node:18.16-alpine as base
|
||||||
|
RUN corepack enable
|
||||||
|
# Installing libvips-dev for sharp Compatibility
|
||||||
|
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
|
||||||
|
ARG NODE_ENV=development
|
||||||
|
ENV NODE_ENV=${NODE_ENV}
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
||||||
|
FROM base AS build
|
||||||
|
# COPY package.json pnpm-lock.yaml ./
|
||||||
|
COPY pnpm-lock.yaml ./
|
||||||
|
# RUN yarn config set network-timeout 600000 -g && yarn install
|
||||||
|
# RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
RUN pnpm fetch
|
||||||
|
COPY ./packages/strapi .
|
||||||
|
RUN pnpm install --offline
|
||||||
|
# ENV PATH=/app/node_modules/.bin:$PATH
|
||||||
|
RUN chown -R node:node /app
|
||||||
|
USER node
|
||||||
|
# RUN pnpm run build
|
||||||
|
# EXPOSE 1337
|
||||||
|
|
||||||
|
|
||||||
|
FROM build AS dev
|
||||||
|
CMD ["pnpm", "run", "dev"]
|
||||||
|
|
||||||
|
FROM build AS release
|
||||||
|
CMD ["pnpm"]
|
||||||
|
ENTRYPOINT ["run", "start"]
|
Loading…
Reference in New Issue