Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation/readme #106

Closed
wants to merge 372 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
372 commits
Select commit Hold shift + click to select a range
6a50b44
chore: add pull request template
jomunker Mar 23, 2024
084d1db
feat(web): add mobile style for btns
Mar 23, 2024
d54b1dd
feat(web): add separate classes for headings without '>_' prefix
Mar 23, 2024
7fdb45a
wip(web): add test code for check styling of headings
Mar 23, 2024
12005ca
refactor(web): exchange rgba value with var for transparent primary c…
Mar 24, 2024
e097049
feat(web): add values for other rounded classes (border-radius)
Mar 24, 2024
b1bfbbd
Merge pull request #20 from vim/implement-style-guide
manuel-pross Mar 24, 2024
2750083
fix(web): production Dockerfile to use standalone output
jomunker Mar 26, 2024
fb6eb6a
feat(web): add link style to dynamic menu items
Mar 27, 2024
31751ce
ops(web): add strapi api token as env var to next/web
Mar 27, 2024
060d61b
feat(web): add basic types for strapi page content
Mar 28, 2024
cd4d552
refactor(web): typo error, reroute to default 404 when no page relati…
Mar 28, 2024
67f9daa
feat(web): add component for plane section of strapi page
Mar 28, 2024
d4f8e3d
feat(web): add component for conditional render content based on sect…
Mar 28, 2024
89cdc66
feat(web): add types for strapi content
Mar 28, 2024
55f1786
refactor(web): card now uses new types and renders content correctly
Mar 28, 2024
4c00ff4
refactor(web): add ContentEntry component to base page to render cond…
Mar 28, 2024
b39e369
feat(web): add button to Content type
Mar 29, 2024
de54519
feat(web): add basic render code to Carousel component
Mar 29, 2024
47db343
build(web): add react-markdown to render markdown code from strapi
Mar 29, 2024
fb1bb0f
feat(web): add class for styling markdown paragraph, add markdown com…
Mar 29, 2024
38a94ee
feat(web): add tailwind classes for custom drop shadow
Mar 29, 2024
addb8e4
feat(web): add gray color with opacity for custom drop shadow
Mar 29, 2024
ef8243a
refactor(web): style card accordingly to wireframes
Mar 29, 2024
679eaed
feat(cms): add homepage as single type
Mar 30, 2024
ecbfc41
refactor(web): aggregate types for strapi content in one file
Mar 31, 2024
e04021a
refactor(web): adjust folder structure of components according to str…
Mar 31, 2024
016fb93
feat(web): add fetching functions for home header and home content
Mar 31, 2024
4028b2c
refactor(web): add inline-block to btn, to properly use it for links
Mar 31, 2024
b204b05
refactor(web): fix imports, make type for SingleTypeAttributes more f…
Mar 31, 2024
ed23971
fix(web): add styles to Link tag to make whole menu item clickable
Mar 31, 2024
2acd417
feat(web): display dynamic content from strapi on home page
Mar 31, 2024
b46e98e
feat(web): add list component according to strapi
Mar 31, 2024
1eea5f1
feat(web): add all missing props to HeroSection according to strapi d…
Mar 31, 2024
3a5ab9a
refactor(web): naming of attributes
Mar 31, 2024
8661b95
refactor(web): remove dynamic content rendering due to new type struc…
Mar 31, 2024
81dd157
feat(web): style hero section according to styleguide
Mar 31, 2024
9b94e82
feat(web): add background text to according to styleguide
Mar 31, 2024
76c9114
refactor(cms): home single type
Mar 31, 2024
5b14241
fix(web): readd symbol for headings
Apr 1, 2024
68372e1
feat(web): add class for responsive text size of vim lettering in hea…
Apr 1, 2024
1f755d2
feat(web): add bottom spacing for elements of content section
Apr 1, 2024
229f4ee
refactor(web): types to match strapi structure
Apr 1, 2024
330f515
wip(web): add method for rendering correct component based on respons…
Apr 1, 2024
d675bc5
refactor(web): import
Apr 1, 2024
a03c394
wip(web): add dummy code to ensure correct compiling
Apr 1, 2024
66fa164
refactor(web): fix imports, add render logic to page
Apr 1, 2024
e3cf470
refactor(web): renaming due to new type system
Apr 1, 2024
ed338c4
refactor(web): renaming due to new type system
Apr 1, 2024
4d045d7
fix(web): add fix for swiper to not overflow grid parent
Apr 6, 2024
a06a314
feat(web): add class for h3
Apr 6, 2024
df2a4fc
feat(web): add helper function for fetching news
Apr 6, 2024
0e591d4
refactor(web): remove Plain component due to add logic for separating…
Apr 6, 2024
2f6fd3d
refactor(cmd): add list as a separate compoonent
Apr 6, 2024
9014ff7
feat(web): finish fetching and rendering of all possible home content…
Apr 6, 2024
05adc8b
fix(build): remove unnecessary env variable
Apr 21, 2024
de8dd39
build(cms): add populate deep package to fetch whole content of home …
Apr 21, 2024
ed56239
feat(web): readd content fetching of dynamic page
Apr 21, 2024
0c33f75
feat(web): add deep fetching to homepage
Apr 21, 2024
304c39a
feat(web): align button on left side of card
Apr 21, 2024
35b5a3b
feat(web): align button on left side of page
Apr 21, 2024
5fc4ec3
build(cms): npm install to generate package.lock.json
Apr 21, 2024
761ed85
fix(web): remove dummy code from page file
Apr 21, 2024
31ba04f
fix(web): delete unused Section Component
Apr 21, 2024
ec27590
wip(web): fix linting for page
Apr 21, 2024
2292b61
fix(web): fix lint errror on page
Apr 21, 2024
2cb4a45
fix(cms): linting
Apr 21, 2024
716f876
ci: update verify-web action with environment variable CMS_API
jomunker Apr 22, 2024
5106d2f
refactor(web): change server components to client components to fetch…
Apr 27, 2024
a1272a9
refactor(web): add key prop to content entries
Apr 27, 2024
4cb75e0
fix(web): readd correct data structuring for news section
Apr 28, 2024
f363da8
fix(web): adjust position of header content according to style guide
Apr 28, 2024
6419f58
refactor(cms): remove auto fetching of all news for every request to …
May 2, 2024
7c3e790
refactor(cms): remove collection name from homepage because it is a s…
May 2, 2024
36719da
fix(web): add headline for news section to render it properly
May 2, 2024
d481790
fix(web): add padding to add space between content and footer
May 2, 2024
8291121
refactor(web): add ternery to prevent 'className=false'
May 2, 2024
a4f0317
refactor(web): add better fallback message when fetching failed, repl…
May 2, 2024
8e3e4f9
feat(web): replace placeholder heading with real heading from strapi …
May 2, 2024
b87dc63
feat(web): add headline to news collection type
May 2, 2024
66579b0
fix(cms): readd collection name, change plural name to singular strin…
May 2, 2024
8f3cb0b
refactor(web): rename variables to make fetching of news per news sec…
May 2, 2024
bd72dc5
fix(cms): readd real plural name due to compile error
May 2, 2024
80e7f71
fix(web): add relative and z-index to main content to place it over v…
May 2, 2024
44b7f79
feat(web): add swr
May 2, 2024
444ec43
feat(build): add swr as dependency
May 2, 2024
1b65d2a
refactor(web): change logic of method to fetch news per newscount to …
May 2, 2024
7f51c7e
refactor(web): remove unused code and dependencies
May 2, 2024
00e46ee
refactor(web): use flatMap to filter undefined values directly
May 2, 2024
8576c0d
refactor(web): add type assertion directly to json transformation
May 2, 2024
e2bb733
fix(web): readd heading of news section
May 2, 2024
5cb5c20
feat(web): add dynamic route handler for nextAuth, add github as prov…
Mar 23, 2024
a666b6d
feat(web): add nextAuth as a dependency
Mar 23, 2024
65dd3df
fix(web): folder structure for next auth
Mar 24, 2024
41ab34f
feat(web): mark next-auth session provider as client component
Mar 24, 2024
3d66174
feat(web): wrap app in session provider
Mar 24, 2024
65133f7
ops(web): copy .env of web folder
Mar 24, 2024
c326c5f
fix(web): remove export of authOptions to fix pipeline
Mar 24, 2024
3384906
fix(web): remove export of handler to fix pipeline
Mar 24, 2024
8841b8c
feat(web): add basic setup for credentials provider
Mar 24, 2024
527a536
fix(web): read session provider which was accidentally removed due to…
Mar 24, 2024
b6e28dc
feat(web): add sign in function, to sign in to strapi
izzyyhh Mar 25, 2024
5f2971a
feat(web): add sign in example on page
izzyyhh Mar 26, 2024
95dca49
feat(web): add registration, sign up function
izzyyhh Mar 28, 2024
4d3eaea
feat(web): add migration script example
izzyyhh May 7, 2024
2ff10a6
feat(web): implement user authentication and add on the fly migration…
izzyyhh May 7, 2024
f5c892d
Merge pull request #24 from vim/user-authentication
hanEck May 8, 2024
ca1271c
refactor(web): add routes enum for fetching data from specific route …
May 9, 2024
9824dfb
Merge branch 'development' into feature/dynamic-content
May 9, 2024
f39156b
refactor(web): readd render logic of slug page
May 9, 2024
e240662
fix(web): move header background to header to prevent appearence on o…
May 9, 2024
85062fe
Merge pull request #26 from vim/feature/dynamic-content
manuel-pross May 10, 2024
fb6f357
feat(cms/index.ts): Add seeding of user on bootstrap
hanEck May 10, 2024
46bc984
feat(cms): Add seed file with iterative user creation
hanEck May 10, 2024
faed47e
fix(cms): Fix linting issues
hanEck May 10, 2024
d81a41d
fix(cms): Fixing more linting issues
hanEck May 10, 2024
4d38e53
fix(cms): New linting errors fixing
hanEck May 10, 2024
f311d58
fix(cms) Linting fix
hanEck May 10, 2024
f2e270d
fix(cms): Linting issues
hanEck May 10, 2024
bbc6bcc
fix(cms): Fix linting issues, define strapi type
hanEck May 10, 2024
6eeb346
fix(cms): Remove linting from seed file due unresolvable linting issue
hanEck May 10, 2024
14526a1
fix(cms): Linting issue regarding strapi type
hanEck May 10, 2024
c1d94fb
fix(cms): Remove linting
hanEck May 10, 2024
710e8c3
Fix(cms): Remove lint-ignore
hanEck May 10, 2024
30565f7
fix(cms): Move seed creation into index.ts
hanEck May 10, 2024
e54cf80
fix(cms): Fix new linting issues
hanEck May 10, 2024
d948913
fix(cms): Add developemt environment condition + Move logic users see…
hanEck May 10, 2024
3a9a910
fix(cms): Fix linting issue
hanEck May 10, 2024
2b38e48
fix(cms): Fix strapi import
hanEck May 10, 2024
891f9c2
Fix(cms): Rollback
hanEck May 10, 2024
b76a8b2
Fix(cms): Update linting file to include babel/ts
hanEck May 10, 2024
936d115
Fix(cms): Rollback babel/ts
hanEck May 10, 2024
0664f87
fix(cms) Resolve parsing error
hanEck May 12, 2024
08b69b8
fix(cms): Add linting for ts files instead of babel
hanEck May 12, 2024
5341eb8
fix(cms): Adjust code to new linting rules
hanEck May 12, 2024
b136376
fix(cms): Adjusting tabs in the linting
hanEck May 12, 2024
3e170e3
fix(cms): Fix the tabs in users.ts
hanEck May 12, 2024
a660a85
fix(cms) Add .eslintignore file to ignore the webpack.js
hanEck May 12, 2024
6a9ddfc
fix(cms): Adjust ignore path
hanEck May 12, 2024
f678045
fix(cms): Remove comments
hanEck May 12, 2024
759be17
Merge pull request #29 from vim/users-db-seed
hanEck May 12, 2024
697c167
feat(ci): init deployment workflow
FabianUntermoser Jun 7, 2024
7295505
feat(ci): enable action for push on dev branch
FabianUntermoser Jun 7, 2024
9bc853d
fix(ci): use correct branch name
FabianUntermoser Jun 7, 2024
2b33be8
fix(ci): update github env secret names
FabianUntermoser Jun 7, 2024
084017c
feat(ci): test remote ssh command
FabianUntermoser Jun 7, 2024
95445a0
refactor(ci): rename dev docker compose file to docker-compose.local.yml
jomunker Jun 7, 2024
6a6c5e7
feat(ci): add dev docker compose file
jomunker Jun 7, 2024
cf94b8e
feat(ci): try to login to ghcrio container reg remotely
FabianUntermoser Jun 7, 2024
1c91a68
fix(ci): change secret var name
FabianUntermoser Jun 7, 2024
4db0569
feat(ci): pull latest docker images remotely
FabianUntermoser Jun 7, 2024
68338b7
feat(ci): deploy container images on remote vm
FabianUntermoser Jun 7, 2024
e7b8f36
fix(ci): fix remote working dir
FabianUntermoser Jun 7, 2024
9f81225
feat(ci): stop remote script execution on failure
FabianUntermoser Jun 7, 2024
c2d8807
fix(ci): fix remote cd cmd
FabianUntermoser Jun 7, 2024
bd8b280
fix(ci): remove redundant docker .env file references
FabianUntermoser Jun 7, 2024
42b6d1c
refactor(ci): ensure container startup
FabianUntermoser Jun 7, 2024
af8367b
fix(ci): use non-standard db port
FabianUntermoser Jun 7, 2024
584ce3b
fix(compose): use DATABASE_PORT variable
FabianUntermoser Jun 10, 2024
56955ee
refactor(ci): update action name
FabianUntermoser Jun 10, 2024
fb8f31b
feat(ci): deploy based on file changes
FabianUntermoser Jun 10, 2024
3307b03
refactor(ci): ensure containers are recreated upon deployment
FabianUntermoser Jun 11, 2024
3e31425
feat(ci): remove build context from web
jomunker Jun 11, 2024
185f481
feat(ci): remove unnecessary volumes
jomunker Jun 11, 2024
1d4bf1a
feat(ci): adjust cms secrets
jomunker Jun 11, 2024
3bcf533
feat(ci): update .env.example
jomunker Jun 11, 2024
6169d1c
feat(ci): scp database files to VM
FabianUntermoser Jun 11, 2024
a00d5ac
fix(ci): web crashing because auth secret was missing in production mode
jomunker Jun 11, 2024
5000400
feat(ci): change database port back to 3306
jomunker Jun 14, 2024
7ceef05
feat(ci): add feature/deployment-vm to on push trigger for cms build …
jomunker Jun 14, 2024
ed1cf56
feat(ci): deploy branch docker image tag
FabianUntermoser Jun 14, 2024
497b818
fix(ci): revert docker image tag override
FabianUntermoser Jun 14, 2024
a8ca125
feat(cms): add cms prefix to url on non local envs
jomunker Jun 14, 2024
ea03308
fix(ci): pull branch image name
FabianUntermoser Jun 14, 2024
a406c3a
fix(ci): avoid copying db files
FabianUntermoser Jun 14, 2024
40db849
feat(cms): add URL variable
FabianUntermoser Jun 14, 2024
6cb68ba
feat(cms): update cors to allow preview.vim.org
FabianUntermoser Jun 14, 2024
b9fedd6
feat(cms): add admin flags to disable promotional features
jomunker Jun 15, 2024
2a624bb
chore(deps): bump actions/setup-node from 2 to 4
dependabot[bot] Jun 17, 2024
4798f56
chore(deps): bump docker/build-push-action from 4.0.0 to 5.4.0
dependabot[bot] Jun 17, 2024
821a344
chore(deps): bump docker/login-action
dependabot[bot] Jun 17, 2024
04debe0
chore(deps-dev): bump lint-staged from 15.2.2 to 15.2.7
dependabot[bot] Jun 17, 2024
6738b30
chore(deps): bump docker/metadata-action
dependabot[bot] Jun 17, 2024
e31baae
chore(deps-dev): bump eslint-plugin-unused-imports in /cms
dependabot[bot] Jun 17, 2024
683d935
chore(cms): export config to json files with config sync plugin
jomunker Jun 17, 2024
4fc14ce
Merge pull request #52 from vim/export-strapi-config
jomunker Jun 17, 2024
6015e78
Merge pull request #37 from vim/dependabot/npm_and_yarn/development/l…
jomunker Jun 17, 2024
064a18f
Merge pull request #34 from vim/dependabot/github_actions/development…
jomunker Jun 17, 2024
e865a23
Merge pull request #35 from vim/dependabot/github_actions/development…
jomunker Jun 17, 2024
665bf34
Merge pull request #36 from vim/dependabot/github_actions/development…
jomunker Jun 17, 2024
3c7197d
chore(deps-dev): bump @types/node from 20.12.11 to 20.14.2
dependabot[bot] Jun 17, 2024
5a86cd1
Merge pull request #38 from vim/dependabot/github_actions/development…
jomunker Jun 17, 2024
3e38990
chore(deps): bump actions/checkout from 2 to 4
dependabot[bot] Jun 17, 2024
764804e
chore(deps): bump @strapi/strapi from 4.24.2 to 4.25.0
dependabot[bot] Jun 17, 2024
5958d89
Merge pull request #40 from vim/dependabot/npm_and_yarn/development/t…
jomunker Jun 17, 2024
2ba0521
Merge pull request #39 from vim/dependabot/github_actions/development…
jomunker Jun 17, 2024
5b6b5ac
chore(deps-dev): bump @commitlint/config-conventional
dependabot[bot] Jun 17, 2024
b9655ea
Merge pull request #43 from vim/dependabot/npm_and_yarn/development/c…
jomunker Jun 17, 2024
11d7e57
Merge pull request #42 from vim/dependabot/npm_and_yarn/development/s…
jomunker Jun 17, 2024
a65820e
chore(deps-dev): bump @commitlint/cli from 19.1.0 to 19.3.0
dependabot[bot] Jun 17, 2024
d181674
Merge pull request #49 from vim/dependabot/npm_and_yarn/cms/developme…
jomunker Jun 17, 2024
20cbf08
Merge pull request #44 from vim/dependabot/npm_and_yarn/development/c…
jomunker Jun 17, 2024
f4a8b86
feat: add environment variables to set telemetry and update flags of cms
jomunker Jun 15, 2024
54b932c
feat(cms): hardcode url
jomunker Jun 15, 2024
9dda23c
fix(cms): avoid setting strapi url on NODE_ENV=development
FabianUntermoser Jun 16, 2024
446cd91
refactor: remove unnecessary compose version
FabianUntermoser Jun 16, 2024
dbccfe4
feat(cms): set CMS_URL at buildtime
FabianUntermoser Jun 16, 2024
4ec94f5
fix(cms): ensure CMS_URL env var is used
FabianUntermoser Jun 16, 2024
d29c1b8
feat(ci): print CMS_URL in CMS prod build
FabianUntermoser Jun 16, 2024
5d8123b
fix(ci): convert CMS_URL to env var instead of secret
FabianUntermoser Jun 16, 2024
4fd62ae
test(ci): print env var
FabianUntermoser Jun 16, 2024
0ae9db7
fix(ci): access CMS_URL as repo var
FabianUntermoser Jun 16, 2024
a0c742a
feat(ci): run deployment after images were pushed
FabianUntermoser Jun 16, 2024
a5f177a
feat(ci): allow manual run of deploy
FabianUntermoser Jun 16, 2024
70711b2
refactor(ci): remove workflow_dispatch
FabianUntermoser Jun 16, 2024
3b6dc13
refactor(ci): clean up log statement
FabianUntermoser Jun 16, 2024
2682903
refactor(ci): remove branch rule on workflow_run
FabianUntermoser Jun 16, 2024
279599e
feat(ci): deploy on dev branches
FabianUntermoser Jun 17, 2024
df5d60e
refactor(ci): avoid quotes in workflow_run
FabianUntermoser Jun 17, 2024
adbbcb9
refactor(ci): remove temporary branch rules
FabianUntermoser Jun 17, 2024
37065a2
chore(ci): add nginx configuration files
jomunker Jun 17, 2024
fa07b97
feat(build): change NODE_ENV=development
FabianUntermoser Jun 18, 2024
0886094
refactor(build): remove CMS_URL env var not needed at runtime
FabianUntermoser Jun 18, 2024
6b30221
feat(ci): run actions for 'feature/*' branches
FabianUntermoser Jun 18, 2024
520ab92
feat(ci): add temporary deploy rule
FabianUntermoser Jun 18, 2024
5b7df30
refactor(ci): remove temporary deployment rules
FabianUntermoser Jun 18, 2024
0cd7c3e
build(web): upgrade to next 14
Jun 20, 2024
3fa62fd
build(web): upgrade typescript
Jun 20, 2024
7afee2a
feat(web): redirect to not found page when no content was fetched
Jun 20, 2024
09dcf0c
feat(web): add custom 500 error page
Jun 20, 2024
a9b491d
fix(web): reorder imports to make eslint run again
Jun 20, 2024
e95af58
Merge pull request #31 from vim/feature/deployment-vm
jomunker Jun 20, 2024
10c1694
Merge pull request #54 from vim/upgrade-to-next-14
manuel-pross Jun 22, 2024
9571bbe
feat(web): add error handling to data fetch on homepage
Jun 23, 2024
ad4f384
feat(web): add error messages
Jun 23, 2024
58efcaf
feat(web): add error handling
Jun 23, 2024
257f9f7
feat(web): add error handling
Jun 23, 2024
bbcee87
fix(web): fetching of news
Jun 23, 2024
7b367ee
fix(web): linting
Jun 23, 2024
8ef3133
fix(ci): avoid running deploy job on PR pushes
FabianUntermoser Jun 27, 2024
41c9e1d
feat(web): check if body is array, add check for headline (required f…
Jul 7, 2024
65cb142
feat(web): add more descriptive error message for users
Jul 7, 2024
079e5bd
feat(web): add error messages regarding page props and session
Jul 7, 2024
1a0868b
feat(web): add optional chaining
Jul 7, 2024
934703e
feat(web): add redirect instead of console.log (due to linting)
Jul 7, 2024
26b7c68
fix(web): fix imports
Jul 7, 2024
b6e48d7
fix(web): render possible cta from strapi backend
Aug 6, 2024
3554637
Merge pull request #97 from vim/fix-missing-cta-in-section
manuel-pross Aug 6, 2024
060d4da
Merge pull request #55 from vim/make-fe-more-resilient
manuel-pross Aug 6, 2024
358f33b
docu(README) => Add getting started section in readme
hanEck Aug 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
22 changes: 22 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
NODE_ENV=development

DATABASE_CLIENT=mysql2
DATABASE_USERNAME=vim
DATABASE_PASSWORD=super-secret
DATABASE_PORT=3306
DATABASE_SSL=false

WEB_DATABASE_NAME=vim
NEXT_PRIVATE_STANDALONE=true
NEXTAUTH_SECRET=testsecret

CMS_DATABASE_NAME=vim_cms
CMS_HOST=0.0.0.0
CMS_PORT=1337
CMS_APP_KEYS=testkey1,testkey2
CMS_API_TOKEN_SALT=testtoken
CMS_ADMIN_JWT_SECRET=testsecret
CMS_JWT_SECRET=testsecret
CMS_TRANSFER_TOKEN_SALT=testtoken
CMS_DISABLE_UPDATE_NOTIFICATION=false
CMS_TELEMETRY_DISABLED=true
42 changes: 42 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
For Work In Progress Pull Requests, please use the Draft PR feature,
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.

Before submitting a Pull Request, please ensure you've done the following:
- πŸ‘·οΈ Create small PRs.
- πŸ“ Use descriptive commit messages.
- πŸ“— Update any related documentation and include any relevant screenshots.
-->

## Description
<!--- Describe your changes in detail -->


## What type of PR is this? (check all applicable)
- [ ] πŸ• Feature
- [ ] πŸ› Bug Fix
- [ ] πŸ“ Documentation Update
- [ ] 🎨 Style
- [ ] πŸ§‘β€πŸ’» Code Refactor
- [ ] πŸ€– Build
- [ ] πŸ” CI
- [ ] πŸ“¦ Chore
- [ ] ⏩ Revert


## Related Issues and Pull Requests
**Fixes:** #(issue/ pr number) <br/>
**Closes:** #(issue/ pr number) <br/>
**Depends on:** #(issue/ pr number)


## Mobile & Desktop Screenshots/Recordings (if applicable)
<!--- Drag and drop your screenshots or recordings here -->
### Mobile

### Desktop

## [optional] Design Documents or Screenshots
<!--- If applicable, add design documents or screenshots to describe the changes visually -->


47 changes: 47 additions & 0 deletions .github/workflows/build-push-cms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Push CMS Docker Image

on:
push:
branches:
- main
- development
- 'feature/**'

jobs:
push_to_registries:
name: Push Docker image to GHCR
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@f7b4ed12385588c3f9bc252f0a2b520d83b52d48
with:
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
images: |
ghcr.io/${{ github.repository }}/cms

- name: Build and push Docker images
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
with:
context: ./cms
file: ./cms/Dockerfile.prod
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: CMS_URL=${{vars.CMS_URL}}
48 changes: 48 additions & 0 deletions .github/workflows/build-push-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Push Web Docker Image

on:
push:
branches:
- main
- development
- 'feature/**'
paths:
- web/**

jobs:
push_to_registries:
name: Push Docker image to GHCR
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@f7b4ed12385588c3f9bc252f0a2b520d83b52d48
with:
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
images: |
ghcr.io/${{ github.repository }}/web

- name: Build and push Docker images
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
with:
context: ./web
file: ./web/Dockerfile.prod
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
52 changes: 52 additions & 0 deletions .github/workflows/deploy-vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy Docker Images

on:
push:
branches:
- main
- development
workflow_run:
workflows:
- Build and Push Web Docker Image
- Build and Push CMS Docker Image
branches:
- development
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: setup environment file
run: |
test -f .env || cp .env.example .env

- name: copy files to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
source: "./docker-compose.dev.yml,./.env"
target: "~/${{ github.event.repository.name }}/"

- name: pull & start container images
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script_stop: true
script: |
cd ~/${{ github.event.repository.name }}/
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{github.actor}} --password-stdin
docker compose -f docker-compose.dev.yml pull
docker compose -f docker-compose.dev.yml down
docker compose -f docker-compose.dev.yml up -d --wait --no-build --force-recreate
docker compose -f docker-compose.dev.yml logs -t -n 50
34 changes: 34 additions & 0 deletions .github/workflows/verify-cms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Verify CMS

on:
push:
branches:
- main
- development
- 'feature/**'
paths:
- cms/**
pull_request:
branches:
- main
- development
paths:
- cms/**

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install cms dependencies
run: cd cms && npm ci
- name: Lint cms
run: cd cms && npm run lint
- name: Build cms
run: cd cms && npm run build
36 changes: 36 additions & 0 deletions .github/workflows/verify-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Verify Web

on:
push:
branches:
- main
- development
- 'feature/**'
paths:
- web/**
pull_request:
branches:
- main
- development
- 'feature/**'
paths:
- web/**

jobs:
build:
runs-on: ubuntu-latest
env:
CMS_API: ${{ vars.CMS_API }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install web dependencies
run: cd web && npm ci
- name: Lint web
run: cd web && npm run lint
- name: Build web
run: cd web && npm run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
node_modules
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Soon there will be a test system where you can follow the current status success

Of course, we will involve you, the community, in the design by collecting ideas and feedback.

# Getting started

To initially build the project on your local computer, you can use the docker-compose.local.yml file, e.g. with docker compose -f docker-compose.local.yml up --build

For more information about the headless CMS used in this project, visit the official documentation: https://docs.strapi.io/


# Requirements

Expand Down
3 changes: 3 additions & 0 deletions cms/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
build
11 changes: 11 additions & 0 deletions cms/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
STRAPI_DISABLE_UPDATE_NOTIFICATION=false
STRAPI_TELEMETRY_DISABLED=true
NODE_ENV=development

HOST=0.0.0.0
PORT=1337
APP_KEYS="toBeModified1,toBeModified2"
API_TOKEN_SALT=tobemodified
ADMIN_JWT_SECRET=tobemodified
TRANSFER_TOKEN_SALT=tobemodified
JWT_SECRET=tobemodified
1 change: 1 addition & 0 deletions cms/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/admin/
24 changes: 24 additions & 0 deletions cms/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier", "unused-imports"],
"ignorePatterns": ["node_modules/", "build/", "dist/", "public/"],
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"env": {
"commonjs": true,
"es6": true,
"node": true,
"browser": false
},
"globals": {
"strapi": true
},
"rules": {
"prettier/prettier": "error",
"no-console": 0
}
}
Loading