# 4. README

Readme projektu powinno zawierać:

  1. Wymagania np. konkretna wersja środowiska node lub yarn
  2. Prosty opis instalacji
  3. Opis uruchomienia aplikacji front w trybie developerskim
  4. Opis uruchomienia aplikacji UI w trybie developerskim
  5. Opis budowania produkcyjnego
  6. Opis uruchoemiania aplikacji w trybie produkcyjnym
  7. Opis innych skryptów/konfiguracji potrzebnych do pracy z projektem

# 4.1 Przykład

Przykład na bazie projektu SU (opens new window):

# SU

Karta multisport project based on NuxtJS Application + Nuxt-typo3

# Requirements

"node": ">=10.x",
"yarn": ">=1.19.0"
1
2

# Installation

Install all needed packages

nvm use
yarn
1
2

Create your .env file in su-new-front directory

cp ./su-new-front/config/.env.latest ./su-new-front/.env
1

# Running

Build application

yarn build
1

Start production process

yarn start
1

Start development process

yarn dev
1

Start storybook

yarn storybook
1

Build new icons for UI

yarn svg
1

Build and start for produciton environment

yarn && ENV_CONFIG=latest yarn build && yarn start
1

Check how to pass different config here

# Development

# Local development

  1. Open project as VSCode workspace
  2. Install all recommended packages
  3. Rembember about feature branches and MR

# Working with yarn workspaces

  1. If you want to add new npm package, just add it to correct workspace su-new-front or su-new-ui
yarn workspace su-new-ui add vue-svgicon
1

# Deployment k8s su benefit

  1. Run manual job build_image
  2. Connect to bnefit vpn
  3. Go to https://tst-kube.srv.benefitsystems.pl/#/login and enter token
  4. Choose su-test namespace from drop-down menu
  5. go to pods and click on vertical triple dots next to node pod and choose delete for it to recreate with latest image build on git.macopedia.pl

# Resources