Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Dockerfile #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Choose alpine base image
FROM node:alpine3.17
# Set working directory
WORKDIR /usr/src/app
# Copy package.json and yarn.lock to working directory
COPY package.json yarn.lock ./
# Install dependencies
RUN yarn install
# Copy ARG to ENV
ARG NODE_ARG
# Set docker ARG to ENV
ENV NODE_ENV $NODE_ARG
# Copy all files to working directory
COPY . .
# Build the app
RUN yarn build
Comment on lines +15 to +16
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need this if you're running yarn serve. yarn build builds so it can be served via a static web server. yarn serve will just build it at start up every time anyway.

# Expose port 8080
EXPOSE 8080
# Run the app
CMD [ "yarn", "serve" ]



6 changes: 6 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ module.exports = {
'vuetify'
],
publicPath: './',
devServer: {
headers: {
"Access-Control-Allow-Origin": "*",
},
allowedHosts: 'all',
}
}