Update document and actions

This commit is contained in:
schooltechx 2023-03-15 18:27:45 +07:00
parent c7e4a996e6
commit 7976dc425a
3 changed files with 15 additions and 7 deletions

View file

@ -17,7 +17,7 @@ env:
CMS_IMAGE_NAME: demo/qualifying-exam-cms
CMS_IMAGE_TAG: 0.1.1
jobs:
# act -W .github/workflows/build.yaml -j local-image
# act -W .github/workflows/local-build.yaml -j local-image
local-image:
runs-on: ubuntu-latest
steps:

View file

@ -14,10 +14,10 @@ on:
env:
REGISTRY: docker.frappet.com
CMS_IMAGE_NAME: demo/qualifying-exam-cms
CMS_IMAGE_TAG: 0.1.1
CMS_IMAGE_TAG: 0.2.1
jobs:
# act --workflows .github/workflows/build.yaml --job remote-image -s DOCKER_USER -s DOCKER_PASS
# act -W .github/workflows/build.yaml -j remote-image -s DOCKER_USER -s DOCKER_PASS
# act --workflows .github/workflows/build.yaml --job remote-image -s DOCKER_USER -s DOCKER_PASS -s SSH_PASSWORD
# act -W .github/workflows/remote-build.yaml -j remote-image -s DOCKER_USER -s DOCKER_PASS -s SSH_PASSWORD
remote-image:
runs-on: ubuntu-latest
steps:

View file

@ -2,7 +2,7 @@
การพัฒนาแบบที่เป็นอยู่ Vue(SPA)+dotnet(Web API) ของบริษัทไม่ได้รองรับ SEO เท่าใดนัก จำเป็นต้องใช้ Meta Framework ที่รองรับ SSR เช่น Nuxt.js เนื่องจากไม่ขึ้นกับส่วนอื่นมากนัก จะทดลองใช้เทคโนโลยีแบบใหม่ๆในการพัฒนา ที่ง่ายในการพัฒนากว่าเดิมจะ SvelteKit เป็นฐาน Daisy UI และ Daisy UI สำหรับการทำ Frontend และจะนำเครื่องมือในการ Automate ต่างๆมาร่วมด้วย
- [Sveltekit](https://www.youtube.com/watch?v=uEJ-Rnm2yOE) Meta JS Framework รองรับ SSR เขียนง่าย
- [TailWindCSS]() ติดตั้งด้วย [svelte-add](https://github.com/svelte-add/tailwindcss)
- [Daisy UI ](https://daisyui.com/)
- [Daisy UI ](https://daisyui.com/) UI Component ที่ใช้ TailWindCSS ใช้ได้ไม่จำกัด Framework
- [PWA](https://web.dev/progressive-web-apps/) ทำให้ Web App เหมือนแอปมือถือ
- [Playwright](https://playwright.dev/) เขียนโค้ดทำการทดสอบเวปแอปบน Browser
- [Vitest](https://vitest.dev/) ทำ Unit test สำหรับ Vite
@ -11,6 +11,11 @@
- [Argo CD](https://argo-cd.readthedocs.io/en/stable/) deploy ขึ้นระบบ Production (K8s)
- [Keycloak](https://www.keycloak.org/) ใช้สำหรับทำระบบ Login
## วีดีโอแสดงการทำงานทั้งหมด
[![Argo Workflows Basic](https://img.youtube.com/vi/WNNDuRjBDd4/0.jpg)](https://youtu.be/WNNDuRjBDd4 "Automate Development")
ในวีดีโอลืมแสดงตัวอย่างการใช้ API
## Install
คำสั่งสำหรับเริ่มต้นสร้างโปรเจ็กเปล่าๆ จนใช้งาน
``` bash
@ -66,13 +71,17 @@ npm run test
npm run test:unit
```
# CI Github Action
ให้ดูโค้ดที่ ../.github/workflow จะแสดงการ
- เอาโค้ดมาจาก github
- สร้าง Docker Image แล้ว Push ขึ้น Registry (docker.frappet.com)
- ssh ไปที่ (192.168.1.9) เพื่อ pull image ตัวใหม่มาใช้
ถ้าจะรันบนเครื่องของเราเอง(local) ให้ติดตั้ง act
``` bash
# Install act (Windows)
winget install nektos.act
# Install act (macOS/Linux)
brew install act
```
ให้ดูโค้ดที่ ../.github/workflow
- [ตัวอย่างการใช้งานในบริษัท](https://youtu.be/k1w_cCzCd0o)
@ -80,7 +89,6 @@ brew install act
# CD Argo CD
TODO
# Note
## PWA
ใน [app.html](./src/app.html) จะเรียกใช้ [manifest.json](./src/static/manifest.json)
ไฟล์ [service-worker.ts](./src/service-worker.ts) จะถูก SvelteKit นำไปทำเป็น Service Worker ให้