add dockerfile
This commit is contained in:
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
npm-debug*
|
||||
.nuxt
|
||||
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM node:11.13.0-alpine
|
||||
|
||||
# create destination directory
|
||||
RUN mkdir -p /usr/src/nuxt-app
|
||||
WORKDIR /usr/src/nuxt-app
|
||||
|
||||
# update and install dependency
|
||||
RUN apk update && apk upgrade
|
||||
RUN apk add git
|
||||
|
||||
# copy the app, note .dockerignore
|
||||
COPY . /usr/src/nuxt-app/
|
||||
RUN npm install
|
||||
|
||||
# build necessary, even if no static files are needed,
|
||||
# since it builds the server as well
|
||||
RUN npm run build
|
||||
|
||||
# expose 5000 on container
|
||||
EXPOSE 5000
|
||||
|
||||
# set app serving to permissive / assigned
|
||||
ENV NUXT_HOST=0.0.0.0
|
||||
# set app port
|
||||
ENV NUXT_PORT=5000
|
||||
|
||||
# start the app
|
||||
CMD [ "npm", "start" ]
|
||||
@@ -31,16 +31,13 @@ export default {
|
||||
computed: {
|
||||
checkReference(){
|
||||
if(this.$route.query.card) {
|
||||
|
||||
const query = this.$route.query.card
|
||||
const title = this.createReferenceTag(this.$props.title)
|
||||
if(title === query) console.log(query, title, title === query? 'card--active': '')
|
||||
|
||||
return title === query
|
||||
? 'card--active'
|
||||
: ''
|
||||
}
|
||||
return ''
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -110,38 +107,4 @@ export default {
|
||||
align-self: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 120px;
|
||||
background-color: #555;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 125%;
|
||||
left: 50%;
|
||||
margin-left: -60px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: #555 transparent transparent transparent;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user