fix 801 port and add images and videos
This commit is contained in:
parent
01a1795d52
commit
409408e672
2 changed files with 10 additions and 6 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -13,10 +13,14 @@ COPY server/package*.json ./server/
|
|||
RUN cd client && npm cache clean --force && rm -rf node_modules && npm install
|
||||
RUN cd server && npm install
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
# Copy ALL source code and assets
|
||||
COPY client/src ./client/src
|
||||
COPY client/public ./client/public
|
||||
COPY client/*.js ./client/
|
||||
COPY client/*.json ./client/
|
||||
COPY server ./server
|
||||
|
||||
# Install nodemailer and dotenv
|
||||
# Install required packages
|
||||
RUN npm install nodemailer dotenv date-fns react-icons
|
||||
|
||||
# Build client
|
||||
|
|
@ -36,7 +40,7 @@ FROM node:14-alpine
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy built assets from build stage
|
||||
# Copy built assets and static files from build stage
|
||||
COPY --from=build /app/client/build ./client/build
|
||||
COPY --from=build /app/server ./server
|
||||
COPY --from=build /app/.env ./.env
|
||||
|
|
@ -51,4 +55,4 @@ RUN npm install --only=production
|
|||
EXPOSE 5000
|
||||
|
||||
# Start the server
|
||||
CMD ["npm", "start"]
|
||||
CMD ["npm", "start"]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ services:
|
|||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "4000:5000"
|
||||
- "801:5000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
env_file:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue