final change to dockerfile that works with external url
This commit is contained in:
parent
3b48b2b33f
commit
92bd260c80
@ -1,15 +1,27 @@
|
||||
# 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 git > /dev/null 2>&1
|
||||
ARG NODE_ENV=production
|
||||
ENV NODE_ENV=${NODE_ENV}
|
||||
FROM node:20-alpine
|
||||
|
||||
# Set working directory inside the container
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy the package.json and lock file (if applicable)
|
||||
COPY ./package.json ./
|
||||
# Bun lock file is unnecessary unless you're using Bun, which you're not here.
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --no-audit --silent
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
|
||||
# Build the Strapi admin panel
|
||||
RUN npm run build
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 1337
|
||||
|
||||
# Command to start the application
|
||||
CMD ["npm", "start"]
|
||||
|
||||
|
||||
# DO NOT FORGET .ENV FILEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
|
||||
# Remove sqlite from database.ts config if not using it
|
||||
# Remove sqlite from database.ts config if not using it
|
||||
|
||||
BIN
api/bun.lockb
BIN
api/bun.lockb
Binary file not shown.
@ -4,4 +4,6 @@ export default ({ env }) => ({
|
||||
app: {
|
||||
keys: env.array('APP_KEYS'),
|
||||
},
|
||||
url: env('PUBLIC_URL', 'https://api.kevosattire.com'),
|
||||
proxy: env.bool('IS_PROXIED', true),
|
||||
});
|
||||
|
||||
824
api/package-lock.json
generated
824
api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,19 +15,20 @@
|
||||
"@strapi/plugin-cloud": "5.3.0",
|
||||
"@strapi/plugin-users-permissions": "5.3.0",
|
||||
"@strapi/strapi": "5.3.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"fs-extra": "^10.1.0",
|
||||
"mime-types": "^2.1.35",
|
||||
"mysql2": "3.9.8",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-router-dom": "^6.0.0",
|
||||
"styled-components": "^6.0.0"
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-router-dom": "^6.28.0",
|
||||
"sharp": "^0.33.5",
|
||||
"styled-components": "^6.1.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"typescript": "^5"
|
||||
"@types/node": "^20.17.6",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0 <=22.x.x",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user