No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    v1.0.6 Dockerfile for SSR build

    Show & Tell
    1
    1
    232
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      elliott last edited by

      Hope this helps someone!

      ###############################################################################
      # Step 1 : Builder image
      #
      FROM node:10-alpine AS builder
      
      # Define working directory and copy source
      WORKDIR /home/node/app
      COPY . .
      # Install dependencies and build whatever you have to build
      # (babel, grunt, webpack, etc.)
      RUN npm install --silent && node node_modules/@quasar/app/bin/quasar-build -m ssr
      
      ###############################################################################
      # Step 2 : Run image
      #
      FROM node:10-alpine
      
      WORKDIR /home/node/app
      
      COPY --from=builder /home/node/app/dist/ssr .
      
      ENV NODE_ENV=production
      
      # Install deps for production only
      RUN npm install --silent && npm cache clean --force
      
      # Expose ports (for orchestrators and dynamic reverse proxies)
      EXPOSE 3000
      
      # Start the app
      CMD  npm start
      
      1 Reply Last reply Reply Quote 1
      • First post
        Last post