diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..141c909 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +npm-debug* +.nuxt \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc92240 --- /dev/null +++ b/Dockerfile @@ -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" ] \ No newline at end of file diff --git a/components/Card.vue b/components/Card.vue index 2c1c716..433381b 100644 --- a/components/Card.vue +++ b/components/Card.vue @@ -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; -}