final change to dockerfile that works with external url

This commit is contained in:
Jacob Delgado 2024-11-17 22:51:53 -08:00
parent 3b48b2b33f
commit 92bd260c80
5 changed files with 697 additions and 174 deletions

View File

@ -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

Binary file not shown.

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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",