This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
{{name}}: | |
container_name: {{name}} | |
build: . | |
image: {{name}}:latest | |
restart: unless-stopped | |
env_file: .env | |
environment: | |
DATABASE_CLIENT: ${DATABASE_CLIENT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creating multi-stage build for production | |
FROM node:20-alpine as build | |
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev > /dev/null 2>&1 | |
ARG NODE_ENV=production | |
ENV NODE_ENV=${NODE_ENV} | |
WORKDIR /opt/ | |
{%- if packageManager == "yarn" %} | |
COPY package.json yarn.lock ./ | |
RUN yarn config set network-timeout 600000 -g && yarn install --production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM {{ nodeVersion }}-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 | |
ARG NODE_ENV=development | |
ENV NODE_ENV=${NODE_ENV} | |
WORKDIR /opt/ | |
{%- if packageManager == "yarn" %} | |
COPY package.json yarn.lock ./ | |
RUN yarn config set network-timeout 600000 -g && yarn install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function update_packages() { | |
echo -e "\n📦 Updating packages... 📦\n" | |
apt-get update -y | |
apt-get upgrade -y | |
apt-get autoremove -y | |
apt-get autoclean -y | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const readline = require('readline'); | |
const ghostEndpoint = 'https://ghostcms.com/content/posts/'; | |
const strapiEndpoint = 'https://strapiinstance.com/api/blogs'; | |
async function fetchData() { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function update_packages() { | |
echo -e "\n📦 Updating packages... 📦\n" | |
apt-get update -y | |
apt-get upgrade -y | |
apt-get dist-upgrade -y | |
apt-get autoremove -y | |
apt-get autoclean -y | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const utils = require("@strapi/utils"); | |
const { ApplicationError } = utils.errors; | |
const isDisconnecting = (disconnectArray, entityValue) => { | |
return disconnectArray.length && entityValue !== null; | |
}; | |
module.exports = { | |
async beforeUpdate(event) { | |
const { data, where } = event.params; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
# Strapi Dev Enviroment | |
strapidev: | |
container_name: strapi_dev | |
build: | |
context: . | |
dockerfile: Dockerfile | |
args: | |
NODE_ENV: ${NODE_ENV} |