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
12
Dockerfile
12
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 client && npm cache clean --force && rm -rf node_modules && npm install
|
||||||
RUN cd server && npm install
|
RUN cd server && npm install
|
||||||
|
|
||||||
# Copy source code
|
# Copy ALL source code and assets
|
||||||
COPY . .
|
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
|
RUN npm install nodemailer dotenv date-fns react-icons
|
||||||
|
|
||||||
# Build client
|
# Build client
|
||||||
|
|
@ -36,7 +40,7 @@ FROM node:14-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
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/client/build ./client/build
|
||||||
COPY --from=build /app/server ./server
|
COPY --from=build /app/server ./server
|
||||||
COPY --from=build /app/.env ./.env
|
COPY --from=build /app/.env ./.env
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "4000:5000"
|
- "801:5000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue