Solved problems with Docker
This commit is contained in:
10
.dockerignore
Normal file
10
.dockerignore
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
README.md
|
||||||
|
.next
|
||||||
|
.git
|
||||||
|
.strapi
|
||||||
|
.tmp
|
||||||
|
build
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Creating multi-stage build for production
|
# Creating multi-stage build for production
|
||||||
FROM node:18-alpine as build
|
FROM node:18-alpine3.18 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
|
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
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
@@ -8,12 +8,13 @@ COPY package.json yarn.lock ./
|
|||||||
RUN yarn global add node-gyp
|
RUN yarn global add node-gyp
|
||||||
RUN yarn config set network-timeout 600000 -g && yarn install --production
|
RUN yarn config set network-timeout 600000 -g && yarn install --production
|
||||||
ENV PATH /opt/node_modules/.bin:$PATH
|
ENV PATH /opt/node_modules/.bin:$PATH
|
||||||
|
ENV NODE_ENV=production
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
# Creating final production image
|
# Creating final production image
|
||||||
FROM node:18-alpine
|
FROM node:18-alpine3.18
|
||||||
RUN apk add --no-cache vips-dev
|
RUN apk add --no-cache vips-dev
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
WORKDIR /opt/
|
WORKDIR /opt/
|
||||||
|
|||||||
11
package.json
11
package.json
@@ -12,13 +12,14 @@
|
|||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi-community/strapi-provider-upload-google-cloud-storage": "^4.10.5",
|
"@strapi-community/strapi-provider-upload-google-cloud-storage": "^4.10.5",
|
||||||
"@strapi/plugin-cloud": "^4.20.4",
|
"@strapi/plugin-cloud": "^4.21.1",
|
||||||
"@strapi/plugin-color-picker": "^4.20.4",
|
"@strapi/plugin-color-picker": "^4.21.1",
|
||||||
"@strapi/plugin-documentation": "^4.20.5",
|
"@strapi/plugin-documentation": "^4.20.5",
|
||||||
"@strapi/plugin-i18n": "^4.20.4",
|
"@strapi/plugin-i18n": "^4.21.1",
|
||||||
"@strapi/plugin-users-permissions": "^4.20.4",
|
"@strapi/plugin-users-permissions": "^4.21.1",
|
||||||
"@strapi/strapi": "^4.20.4",
|
"@strapi/strapi": "^4.21.1",
|
||||||
"better-sqlite3": "8.6.0",
|
"better-sqlite3": "8.6.0",
|
||||||
|
"esbuild": "^0.20.2",
|
||||||
"mysql2": "^3.9.2",
|
"mysql2": "^3.9.2",
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
"react-dom": "^18.0.0",
|
"react-dom": "^18.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user