From 571b2944adb953bcae26e68520f004f4d8fcbe92 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Mon, 8 Feb 2021 14:26:50 +0100 Subject: [PATCH 1/6] update README --- README.md | 117 +++--------------------------------------------------- 1 file changed, 5 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 2e5fb18e1..e6aa04f74 100755 --- a/README.md +++ b/README.md @@ -1,85 +1,24 @@ -https://gruhn.github.io/vue-qrcode-reader/api/QrcodeStream.html -https://github.com/gruhn/vue-qrcode-reader - -https://bootstrap-vue.org/docs/components/image +# Bootstrap Vue Gradido Wallet -# [BootstrapVue Argon Dashboard](https://demos.creative-tim.com/bootstrap-vue-argon-dashboard/?ref=bvad-github-readme) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/home?status=BootstrapVue%20Argon%20Dashboard%20is%20a%20Free%20Bootstrap%20and%Vue.js%20Dashboard%20made%20using%vue-cli%20%E2%9D%A4%EF%B8%8F%0Ahttps%3A//demos.creative-tim.com/bootstrap-vue-argon-dashboard%20%vue.js%20%23vue-cli%20%23argon%20%23argondesign%20%23angulardashboard%20%23argonvue%20%23vuedesign%20%23bootstrap%20%23design%20%23uikit%20%23freebie%20%20via%20%40CreativeTim) - - - - ![version](https://img.shields.io/badge/version-1.0.0-blue.svg) ![license](https://img.shields.io/badge/license-MIT-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/bootstrap-vue-argon-dashboard.svg?maxAge=2592000)](https://github.com/creativetimofficial/bootstrap-vue-argon-dashboard/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/bootstrap-vue-argon-dashboard.svg?maxAge=2592000)](https://github.com/creativetimofficial/bootstrap-vue-argon-dashboard/issues?q=is%3Aissue+is%3Aclosed) [![Join the chat at https://gitter.im/NIT-dgp/General](https://badges.gitter.im/NIT-dgp/General.svg)](https://gitter.im/creative-tim-general/Lobby) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/E4aHAQy) - - -![Product Gif](https://raw.githubusercontent.com/creativetimofficial/public-assets/master/vue-argon-dashboard/vue-argon-dashboard.gif) **Fully Coded Components** -BootstrapVue Argon Dashboard is built with over 100 individual components, giving you the freedom of choosing and combining. All components can take variations in color, that you can easily modify using SASS files. +Bootstrap Vue Gradido Wallet - is built with over 100 individual components, giving you the freedom of choosing and combining. All components can take variations in color, that you can easily modify using SASS files. You will save a lot of time going from prototyping to full-functional code, because all elements are implemented. This Dashboard is coming with pre-built examples, so the development process is seamless, switching from our pages to the real website is very easy to be done. Every element has multiple states for colors, styles, hover, focus, that you can easily access and use. -**Complex Documentation** - -Each element is well presented in a very complex documentation. You can read more about the idea behind this [dashboard here](https://www.creative-tim.com/learning-lab/bootstrap-vue/overview/argon-dashboard?ref=bvad-github-readme). You can check the [components here](https://www.creative-tim.com/learning-lab/bootstrap-vue/avatar/argon-dashboard?ref=bvad-github-readme) and the [foundation here](https://www.creative-tim.com/learning-lab/bootstrap-vue/colors/argon-dashboard?ref=bvad-github-readme). - -**Example Pages** - -If you want to get inspiration or just show something directly to your clients, you can jump start your development with our pre-built example pages. You will be able to quickly set up the basic structure for your web project. - - -## Table of Contents - -* [Versions](#versions) -* [Demo](#demo) -* [Quick Start](#quick-start) -* [Documentation](#documentation) -* [File Structure](#file-structure) -* [Browser Support](#browser-support) -* [Resources](#resources) -* [Reporting Issues](#reporting-issues) -* [Licensing](#licensing) -* [Useful Links](#useful-links) - -## Versions - -[](https://www.creative-tim.com/product/bootstrap-vue-argon-dashboard)[](https://www.creative-tim.com/product/vue-argon-dashboard)[](https://www.creative-tim.com/product/argon-dashboard)[](https://www.creative-tim.com/product/argon-dashboard-react)[](https://www.creative-tim.com/product/vue-argon-dashboard)[](https://www.creative-tim.com/product/argon-dashboard-nodejs)[](https://www.creative-tim.com/product/argon-dashboard-laravel)[](https://github.com/creativetimofficial/argon-dashboard/tree/sketch) - - - -|Vue | HTML | React | Angular | -| --- | --- | --- | --- | -[![Vue Argon Dashboard](https://github.com/creativetimofficial/public-assets/blob/master/vue-argon-dashboard/vue-argon-dashboard.jpg?raw=true)](https://www.creative-tim.com/product/vue-argon-dashboard?ref=bvad-github-readme) | [![Argon Dashboard HTML](https://github.com/creativetimofficial/public-assets/blob/master/argon-dashboard/argon-dashboard.jpg?raw=true)](https://www.creative-tim.com/product/vue-argon-dashboard?ref=bvad-github-readme) | [![Argon Dashboard React](https://github.com/creativetimofficial/public-assets/blob/master/argon-dashboard-react/argon-dashboard-react.jpg?raw=true)](https://www.creative-tim.com/product/argon-dashboard-react?ref=bvad-github-readme) | [![Argon Dashboard Angular](https://github.com/creativetimofficial/public-assets/blob/master/argon-dashboard-angular/argon-dashboard-angular.jpg?raw=true)](https://www.creative-tim.com/product/argon-dashboard-angular?ref=bvad-github-readme) - -| BootstrapVue | NodeJS | Laravel | -| --- | --- | --- | -| [![BootstrapVue Argon Dashboard](https://github.com/creativetimofficial/public-assets/blob/master/bootstrap-vue-argon-dashboard/opt_ad_bootstrapvue_thumbnail.jpg?raw=true)](https://www.creative-tim.com/product/bootstrap-vue-argon-dashboard?ref=bvad-github-readme) | [![Argon Dashboard NodeJS](https://github.com/creativetimofficial/public-assets/blob/master/argon-dashboard-nodejs/argon-dashboard-nodejs.jpg?raw=true)](https://www.creative-tim.com/product/argon-dashboard-nodejs?ref=bvad-github-readme) | [![Argon Dashboard Laravel](https://github.com/creativetimofficial/public-assets/blob/master/argon-dashboard-laravel/argon-dashboard-laravel.jpg?raw=true)](https://www.creative-tim.com/product/argon-dashboard-laravel?ref=bvad-github-readme) | - -## Demo - -| Dashboard Page | Icons Page | User Profile Page | Tables Page | Login Page | Register Page | -| --- | --- | --- | --- | --- | --- | -| [![Dashboard Page](https://raw.githubusercontent.com/creativetimofficial/public-assets/master/vue-argon-dashboard/dashboard.png)](https://demos.creative-tim.com/bootstrap-vue-argon-dashboard/#/dashboard?ref=bvad-github-readme) | [![Icons Page](https://github.com/creativetimofficial/public-assets/blob/master/vue-argon-dashboard/icons.png?raw=true)](https://demos.creative-tim.com/bootstrap-vue-argon-dashboard/#/icons?ref=bvad-github-readme) | [![User Profile Page](https://github.com/creativetimofficial/public-assets/blob/master/vue-argon-dashboard/user.png?raw=true)](https://demos.creative-tim.com/bootsrap-vue-argon-dashboard/#/profile?ref=bvad-github-readme) | [![Tables Page](https://raw.githubusercontent.com/creativetimofficial/public-assets/master/vue-argon-dashboard/tables.png)](https://demos.creative-tim.com/bootstrap-vue-argon-dashboard/#/tables?ref=bvad-github-readme) | [![Login Page](https://github.com/creativetimofficial/public-assets/blob/master/vue-argon-dashboard/login.png?raw=true)](https://demos.creative-tim.com/bootstrap-vue-argon-dashboard/#/login?ref=bvad-github-readme) | [![Register Page](https://github.com/creativetimofficial/public-assets/blob/master/vue-argon-dashboard/register.png?raw=true)](https://demos.creative-tim.com/bootsrap-vue-argon-dashboard/#/register?ref=bvad-github-readme) - -[View More](https://demos.creative-tim.com/bootstrap-vue-argon-dashboard/#/dashboard) - - -## Quick start - -- [Download from Github](https://github.com/creativetimofficial/bootsrap-vue-argon-dashboard/archive/master.zip). -- [Download from Creative Tim](https://www.creative-tim.com/product/bootstrap-vue-argon-dashboard?ref=bvad-github-readme). -- Clone the repo: `git clone https://github.com/creativetimofficial/bootstrap-vue-argon-dashboard.git`. - + ## Documentation -The documentation for the BootsrapVue Argon Dashboard is hosted at our [website](https://www.creative-tim.com/learning-lab/bootstrap-vue/colors/argon-dashboard). +The documentation for the Bootstrap Vue Gradido Wallet is hosted at our [website](). ## File Structure Within the download you'll find the following directories and files: ``` -|-- BootstrapVue Argon Dashboard +|-- Bootstrap Vue Gradido Wallet |-- .gitignore |-- CHANGELOG.md |-- ISSUES_TEMPLATE.md @@ -203,55 +142,9 @@ Within the download you'll find the following directories and files: ``` -## Browser Support - -At present, we officially aim to support the last two versions of the following browsers: - - -## Resources -- Demo: -- Download Page: -- Documentation: -- License Agreement: -- Support: -- Issues: [Github Issues Page](https://github.com/creativetimofficial/bootstrap-vue-argon-dashboard/issues?ref=bvad-github-readme) -## Reporting Issues -We use GitHub Issues as the official bug tracker for the BootstrapVue Argon Dashboard. Here are some advices for our users that want to report an issue: -1. Make sure that you are using the latest version of the BootstrapVue Argon Dashboard. Check the CHANGELOG from your dashboard on our [website](https://www.creative-tim.com/?ref=bvad-github-readme). -2. Providing us reproducible steps for the issue will shorten the time it takes for it to be fixed. -3. Some issues may be browser specific, so specifying in what browser you encountered the issue might help. - -## Licensing - -- Copyright 2020 Creative Tim (https://www.creative-tim.com/?ref=bvad-github-readme) - -- Licensed under MIT (https://github.com/creativetimofficial/vue-argon-dashboard/blob/master/LICENSE.md) - -## Useful Links - -- [Tutorials](https://www.youtube.com/channel/UCVyTG4sCw-rOvB9oHkzZD1w?ref=creativetim) -- [Affiliate Program](https://www.creative-tim.com/affiliates/new?ref=bvad-github-readme) (earn money) -- [Blog Creative Tim](http://blog.creative-tim.com/?ref=bvad-github-readme) -- [Free Products](https://www.creative-tim.com/bootstrap-themes/free?ref=bvad-github-readme) from Creative Tim -- [Premium Products](https://www.creative-tim.com/bootstrap-themes/premium?ref=bvad-github-readme) from Creative Tim -- [React Products](https://www.creative-tim.com/bootstrap-themes/react-themes?ref=bvad-github-readme) from Creative Tim -- [Angular Products](https://www.creative-tim.com/bootstrap-themes/angular-themes?ref=bvad-github-readme) from Creative Tim -- [VueJS Products](https://www.creative-tim.com/bootstrap-themes/vuejs-themes?ref=bvad-github-readme) from Creative Tim -- [More products](https://www.creative-tim.com/bootstrap-themes?ref=bvad-github-readme) from Creative Tim -- Check our Bundles [here](https://www.creative-tim.com/bundles?ref=bvad-github-readme) - -### Social Media - -Twitter: - -Facebook: - -Dribbble: - -Instagram: From 35394ea66f3d14459756a0a450909cc282f52bc6 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Mon, 8 Feb 2021 14:28:29 +0100 Subject: [PATCH 2/6] Update README --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e6aa04f74..d1360d91d 100755 --- a/README.md +++ b/README.md @@ -1,18 +1,12 @@ -# Bootstrap Vue Gradido Wallet +# Vue Gradido Wallet **Fully Coded Components** -Bootstrap Vue Gradido Wallet - is built with over 100 individual components, giving you the freedom of choosing and combining. All components can take variations in color, that you can easily modify using SASS files. -You will save a lot of time going from prototyping to full-functional code, because all elements are implemented. This Dashboard is coming with pre-built examples, so the development process is seamless, switching from our pages to the real website is very easy to be done. -Every element has multiple states for colors, styles, hover, focus, that you can easily access and use. - +Bootstrap Vue Gradido Wallet - + - -## Documentation -The documentation for the Bootstrap Vue Gradido Wallet is hosted at our [website](). - ## File Structure Within the download you'll find the following directories and files: From e49a0bf3a3fbe8ac0c3c70704528ab1529cd1e5f Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Mon, 8 Feb 2021 14:33:57 +0100 Subject: [PATCH 3/6] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d1360d91d..867c2abb6 100755 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Bootstrap Vue Gradido Wallet - + **DEMO:** [https://vast-atoll-44277.herokuapp.com/](https://vast-atoll-44277.herokuapp.com/) ## File Structure From 3b259d2e111d59f5339c73541d12318be31dc9b1 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Mon, 8 Feb 2021 15:22:09 +0100 Subject: [PATCH 4/6] Update README --- README.md | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/README.md b/README.md index 867c2abb6..35ade8aa6 100755 --- a/README.md +++ b/README.md @@ -137,6 +137,194 @@ Within the download you'll find the following directories and files: ``` +🌟 [EPIC] - Gradido Web- and App- Client + +Web-App: +Einstiegspunkt: +[ ] Login-Server for app-requests (Sollte in der App einstellbar sein) https://staging.gradido.net/appRequest + +[ ] Auch die url für Community-Server requests sollte in einer Variable gespeichert sein. +CakePHP Seite auf die der Login-Server nach dem Login weiterleitet. +https://staging.gradido.net/client + +Hiermit kann ein Konto anlegt werden: +https://staging.gradido.net/account/registerDirect + +# Fehler im Code +Wenn etwas nicht stimmt, entweder mit den Input-Paremetern, oder ein Fehler im Code gibt es meistens folgendes als Ergebnis: +``` +{ + "state": "error", + "msg": "", + "details": "" +} + ``` + +# csfr Token +Bindet das js ein. +Stellt folgende js-Variablen zur Verfügung: + +csfr : string +csfr Token (https://book.cakephp.org/3/en/controllers/components/csrf.html) +user: object + +# Testbenutzer +Enthält Daten des aktuell eingeloggten Benutzers, z.B.: mein Testbenutzer: +console.log(user); +``` +{ + "created": 1578688666, + "disabled": false, + "email": "dervommond@gmail.com", + "email_checked": true, + "first_name": "Max", + "group_alias": "gdd1", + "ident_hash": 2928827813, + "last_name": "Miau", + "public_hex": "2ed28a1cf5e116d83615406bc577152221c2f774a5656f66a0e7540f7576d71b", + "role": "admin", + "username": "", + "balance": 174500, // Gradido Cent, 4 Nachkommastellen (2 Reserve) entspricht 17,45 + "id": 1, + "errorCount": 0 +} +``` +Das sind im Grunde die Benutzerangaben aus der Login-Server Datenbank. + +session :int +Login-Server session id, notwendig für alle ajax-request. + +# Seiten +Navigation: +Für alle Benutzer: + +Kontoübersicht +Startseite +Überweisung +Mitgliederbereich (externer Link zu elopage: https://elopage.com/s/gradido/sign_in) +Rechts oben: +Profil +Abmelden +Startseite: +Für alle Benutzer: +Kontoübersicht +Überweisung +Benutzer Suche: +http://daten.einhornimmond.de/gradido_mithril_user_search.zip + +# Mobile App +Login über eingebundene Login-Seite +auslesen der session_id aus dem Session Cookie: GRADIDO_LOGIN +Access Token vom Login-Server anfragen: +GET https://staging.gradido.net/appRequest/acquireAccessToken?session_id = +Du kannst auch den Cookie wieder mitschicken, solange die Login-Server Basis-url die gleiche ist, müsste das auch funktionieren. +Antwort: +``` +{ + "state":"success", + "access_token" : "", + "group_base_url":"" +} +``` +Unterschied Access Token von der session_id: Access Tokens sind länger gültig +Du kannst über eine gültige session_id einen Access Token erhalten der eine Woche gültig ist. Die Client-IP des Aufrufess muss die gleiche sein, mit der eingeloggt wurde. + +Mit einem gültigen Access-Token kannst du eine session_id erhalten. +GET https://staging.gradido.net/appRequest/appLogin?access_token = +Mit jedem Aufruf wird die Gültigkeit der Access-Tokens erneuert. +Antwort: +``` +{ + "state":"success", + "session_id" : "" +} +``` +# Kontoübersicht: +Liefert den aktuellen Kontostand. +Ajax: +GET https://staging.gradido.net/state-balances/ajaxGetBalance +Antwort: +`{"state":"success","balance":}` + +Listet die letzten Transaktionen auf, mit Paging. +Ajax: +GET https://staging.gradido.net/state-user-transactions/ajaxListTransactions// +page: Seite der Transaktionen, default = 1 +count: Wie viele Transaktionen pro Seite, default = 20 + +Antwort: +Wenn alles okay: +``` +{"state":"success", "transactions": + [ + { + "name": "", + "email": "", //optional, only if send or receive and other user is known + "type": "creation|send|receive", + "transaction_id": , // db id not id from blockchain + "date": "", + "balance": , + "memo": "", + "pubkey": "" + + } + ], + "transactionExecutingCount": , + "count": +} +``` +Holt die aktuelle Summe und Anzahl Einträge vom GDT Server für den Benutzer. +Ajax: +GET https://staging.gradido.net/state-balances/ajaxGdtOverview +```{"state": "success", "gdt": {"sum": , "count":}}``` + +Holt die letzten 100 GDT-Einträge für den Benutzer + +Ein GDT Eintrag sieht so aus: +``` +{ + "id": 8857, + "amount": 1000, // = 10,00 Euro + "date": "2020-06-17T14:12:00+00:00", + "email": "foerderkreis-1@gradido.org", + "comment": null, + "coupon_code": "", + "gdt_entry_type_id": 4, + "factor": "20.0000", + "amount2": 0, + "factor2": "0.0500", + "gdt": 1000 +} +``` +gdt entry types: (Auf welchen Weg der Eintrag eingetragen wurde) +1. Form: einzeln über das Formular, sollte nur wenige Einträg e betreffen +2. CVS: CVS Import, betrifft vor allem ältere Einträge von Spenden die weder über Elopage noch über Digistore reinkamen +3. Elopage: Alle GDT Einträge die automatisch durch eine Elopage-Transaktion erstellt wurden für den Einzahlenden. +4. Elopage-Publisher: Alle GDT Einträge die automatisch durch eine Elopage-Transaktion erstellt wurden für den Publisher, bis zu 5 Level nach oben. +5. Digistore: Alle GDT Einträge die automatisch durch eine Digistore-Transaktion angelegt wurden. +6. Cvs2: GDT Einträge die durch ein anderen CVS Import eingetragen wurden, betrifft ebenfalls nur alte Einträge. +amount: Menge in Euro-cent (2 Nachkommastellen) was eingezahlt wurde +factor: Der Umrechnungsfaktor der beim Einzahlen für den betreffenden Unterstützer galt. +amount2: ein Bonus Factor der drauf gerechnet wird bei Sonderaktionen, default 0 +factor2: ein Bonus-Factor, default 1, wird aktuell im Code auf für Publisher-Transactionen benutzt. +Gdt: resultierender GDT Wert, wird folgendermaßen aus den bisherigen Werten berechnet: +gdt = amount * factor * factor2 + amount2 +Es gibt zwei Arten von GDT Einträgen: + +Was der Benutzer selbst in Euro gespendet hat +Was jemand anderes an Euro gespendet hat, der den Benutzer als Publisher gewählt hat (publisher-id bei Elopage), Publisher bis Level 5 erhalten jeweils 5% an GDT was der Spender erhalten hat. +z.B. Anna spendet 100 Euro bei einem Faktor von 20, bekommt also 2000 GDT. +Sie hat als Publisher Bernd angegeben, Bern erhält 100 GDT. +Bernd hat als Publisher damals Paul angegeben, Paul erhält also ebenfalls noch 100 GDT. +Bis zum 5. (Bernd ist 2.) +Diese Beziehung wird durch die connectEntries dargestellt. +Insbesondere durch den publishersPath, connect enthält einfach nur alle mögliche Daten. + +# TODO +TODO: Update GDT-Server um paging und Zugriff auf alle Einträge zu erhalten, optimierter Zugriff +GET https://staging.gradido.net/state-balances/ajaxGdtTransactions +Liefert wenn alles in Ordnung ist: + From 0261535ba4f607af25d7fd1157e253be14d8ef49 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Tue, 9 Feb 2021 14:07:38 +0100 Subject: [PATCH 5/6] 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 6/6] 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