feat: Containerize services with Docker Compose (PostgreSQL, Strapi CMS, Express Backend, Nginx Frontend) on custom ports >9000
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install native build tools for packages like better-sqlite3 / pg
|
||||
RUN apk add --no-cache python3 make g++ gcc libc-dev
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files and install dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
# Copy rest of Strapi CMS source code
|
||||
COPY . .
|
||||
|
||||
# Build Strapi admin interface
|
||||
ENV NODE_ENV=production
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 1337
|
||||
|
||||
CMD ["npm", "run", "start"]
|
||||
Reference in New Issue
Block a user