From 0261535ba4f607af25d7fd1157e253be14d8ef49 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Tue, 9 Feb 2021 14:07:38 +0100 Subject: [PATCH 1/2] Update README --- README.md | 143 +++++++----------------------------------------------- 1 file changed, 17 insertions(+), 126 deletions(-) diff --git a/README.md b/README.md index 35ade8aa6..9c39be8cf 100755 --- a/README.md +++ b/README.md @@ -9,135 +9,26 @@ Bootstrap Vue Gradido Wallet - **DEMO:** [https://vast-atoll-44277.herokuapp.com/](https://vast-atoll-44277.herokuapp.com/) -## File Structure -Within the download you'll find the following directories and files: +ISSUES: -``` -|-- Bootstrap Vue Gradido Wallet - |-- .gitignore - |-- CHANGELOG.md - |-- ISSUES_TEMPLATE.md - |-- LICENSE.md - |-- README.md - |-- babel.config.js - |-- package.json - |-- public - | |-- img - | |-- favicon.ico - | |-- index.html - |-- src - |-- assets - | |-- logo.png - | |-- scss - | | |-- core - | | |-- custom - | | |-- argon.scss - | |-- vendor - | |-- nucleo - |-- components - | |-- Badge.vue - | |-- BaseAlert.vue - | |-- BaseButton.vue - | |-- BaseDropdown.vue - | |-- BaseHeader.vue - | |-- BasePagination.vue - | |-- BaseProgress.vue - | |-- BaseSlider.vue - | |-- BaseTable.vue - | |-- ButtonCheckbox.vue - | |-- ButtonRadioGroup.vue - | |-- CloseButton.vue - | |-- index.js - | |-- LoadingPanel.vue - | |-- Modal.vue - | |-- NavbarToggleButton.vue - | |-- Breadcrumb - | | |-- Breadcrumb.vue - | | |-- BreadcrumbItem.vue - | | |-- RouteBreadcrumb.vue - | |-- Cards - | | |-- Card.vue - | | |-- StatsCard.vue - | |-- Charts - | | |-- BarChart.js - | | |-- config.js - | | |-- globalOptionsMixin.js - | | |-- LineChart.js - | | |-- optionHelpers.js - | | |-- roundedCornersExtension.js - | |-- Collapse - | | |-- Collapse.vue - | | |-- CollapseItem.vue - | |-- Inputs - | | |-- BaseCheckbox.vue - | | |-- BaseInput.vue - | | |-- BaseRadio.vue - | |-- Navbar - | | |-- BaseNav.vue - | | |-- NavbarToggleButton.vue - | |-- NotificationPlugin - | | |-- index.js - | | |-- Notification.vue - | | |-- Notifications.vue - | |-- SidebarPlugin - | | |-- index.js - | | |-- SideBar.vue - | | |-- SidebarItem.vue - | |-- Tabs - | | |-- Tab.vue - | | |-- Tabs.vue - |-- directives - | |-- click-ouside.js - |-- plugins - | |-- dashboard-plugin.js - | |-- globalComponents.js - | |-- globalDirectives.js - |-- routes - | |-- router.js - | |-- routes.js - | |-- starterRouter.js - |-- util - | |-- throttle.js - |-- views - |-- Dashboard.vue - |-- GoogleMaps.vue - |-- Icons.vue - |-- NotFoundPage.vue - |-- RegularTables.vue - |-- Dashboard - | |-- PageVisitsTable.vue - | |-- SocialTrafficTable.vue - |-- Layout - | |-- Content.vue - | |-- ContentFooter.vue - | |-- DashboardLayout.vue - | |-- DashboardNavbar.vue - |-- Maps - |-- APY_KEY.js - |-- Pages - |-- UserProfile - |-- AuthLayout.vue - |-- Login.vue - |-- Register.vue - |-- UserProfile.vue - |-- Starter - |-- SampleFooter.vue - |-- SampleLayout.vue - |-- SampleNavbar.vue - |-- SamplePage.vue - |-- Tables - |-- RegularTables - |-- projects.js - |-- users.js - |-- App.vue - |-- main.js - |-- polyfills.js + - [ ] csrf token management + + + - [ ] Userdaten - Testbenutzer - test.json + + + - [ ] Session Cookie: GRADIDO_LOGIN enhancement + + + - [ ] 🚀 [Feature] - Create a dockerfile for the frontend application enhancement + + + + + ___________ -``` - - -🌟 [EPIC] - Gradido Web- and App- Client +# 🌟 [EPIC] - Gradido Web- and App- Client Web-App: Einstiegspunkt: From bbb87c54d510af7ef2e5f0e7b5e3a614832efb2d Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 11 Feb 2021 15:48:32 +0100 Subject: [PATCH 2/2] Add Dockerfile --- Dockerfile | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..63d81c9f4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,108 @@ +################################################################################## +# BASE ########################################################################### +################################################################################## +FROM node:12.19.0-alpine3.10 as base + +# ENVs (available in production aswell, can be overwritten by commandline or env file) +## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame +ENV DOCKER_WORKDIR="/app" +## We Cannot do `$(date -u +'%Y-%m-%dT%H:%M:%SZ')` here so we use unix timestamp=0 +ENV BUILD_DATE="1970-01-01T00:00:00.00Z" +## We cannot do $(npm run version).${BUILD_NUMBER} here so we default to 0.0.0.0 +ENV BUILD_VERSION="0.0.0.0" +## We cannot do `$(git rev-parse --short HEAD)` here so we default to 0000000 +ENV BUILD_COMMIT="0000000" +## SET NODE_ENV +ENV NODE_ENV="production" +## App relevant Envs +ENV PORT="8080" + +# Labels +LABEL org.label-schema.build-date="${BUILD_DATE}" +LABEL org.label-schema.name="gradido:frontend" +LABEL org.label-schema.description="Gradido Vue Webwallet" +LABEL org.label-schema.usage="https://github.com/gradido/gradido_vue_wallet/blob/master/README.md" +LABEL org.label-schema.url="https://gradido.net" +LABEL org.label-schema.vcs-url="https://github.com/gradido/gradido_vue_wallet/tree/master/backend" +LABEL org.label-schema.vcs-ref="${BUILD_COMMIT}" +LABEL org.label-schema.vendor="gradido Community" +LABEL org.label-schema.version="${BUILD_VERSION}" +LABEL org.label-schema.schema-version="1.0" +LABEL maintainer="support@ogradido.net" + +# Install Additional Software +## install: git +#RUN apk --no-cache add git + +# Settings +## Expose Container Port +EXPOSE ${PORT} + +## Workdir +RUN mkdir -p ${DOCKER_WORKDIR} +WORKDIR ${DOCKER_WORKDIR} + +################################################################################## +# DEVELOPMENT (Connected to the local environment, to reload on demand) ########## +################################################################################## +FROM base as development + +# We don't need to copy or build anything since we gonna bind to the +# local filesystem which will need a rebuild anyway + +# Run command +# (for development we need to execute npm install since the +# node_modules are on another volume and need updating) +CMD /bin/sh -c "npm install && npm run dev" + +################################################################################## +# BUILD (Does contain all files and is therefore bloated) ######################## +################################################################################## +FROM base as build + +# Copy everything +COPY . . +# npm install +RUN npm install --production=false --frozen-lockfile --non-interactive +# npm build +RUN npm run build + +################################################################################## +# TEST ########################################################################### +################################################################################## +FROM build as test + +# Run command +CMD /bin/sh -c "npm run dev" + +################################################################################## +# PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # +################################################################################## +FROM base as production + +# Copy "binary"-files from build image +COPY --from=build ${DOCKER_WORKDIR}/.nuxt ./.nuxt +COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules +COPY --from=build ${DOCKER_WORKDIR}/nuxt.config.js ./nuxt.config.js +# Copy static files +# TODO - this should be one Folder containign all stuff needed to be copied +#COPY --from=build ${DOCKER_WORKDIR}/constants ./constants +#COPY --from=build ${DOCKER_WORKDIR}/static ./static +#COPY --from=build ${DOCKER_WORKDIR}/locales ./locales +# Copy package.json for script definitions (lock file should not be needed) +COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json + +# Run command +CMD /bin/sh -c "npm run start" + + + +## add `/usr/src/app/node_modules/.bin` to $PATH +#ENV PATH /usr/src/app/node_modules/.bin:$PATH +# +## install and cache app dependencies +#COPY package.json /usr/src/app/package.json +#RUN npm install +#RUN npm install -g @vue/cli +## start app +#CMD ["npm", "run", "serve"] \ No newline at end of file