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

Dev/10.3.0 #1599

Merged
merged 188 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
cecf77f
Test darkmode base colors
SimonRothUCF Feb 29, 2024
af3cb45
Fix merge conflict
SimonRothUCF Feb 29, 2024
0f6a51d
add qset generation (limited)
cayb0rg Apr 30, 2024
f8e6be5
add input for number of questions
cayb0rg Apr 30, 2024
76d11e1
support qsets with 'assets' field
cayb0rg Apr 30, 2024
77282f3
if generating images, remove real names
cayb0rg Apr 30, 2024
c2ba53f
Add option to extend existing qset
cayb0rg May 8, 2024
f8b686c
Merge branch 'dev/10.2.0' of github.com:ucfopen/Materia into question…
cayb0rg May 8, 2024
ce250f2
Merge branch 'dev/10.2.0' of github.com:ucfopen/Materia into question…
cayb0rg Jun 10, 2024
c2a2881
Tweak prompt, fix merge conflicts
cayb0rg Jun 11, 2024
35eebfe
Make UI pretty
cayb0rg Jun 11, 2024
f404990
Hide generator for unsaved new instances
cayb0rg Jun 11, 2024
815a045
Fix error in previous commit
cayb0rg Jun 11, 2024
ec66d79
Fix file closing in image generation
cayb0rg Jun 11, 2024
8df738f
Add is_generable field to Widget model, hide generate button when API…
cayb0rg Jun 12, 2024
cf3217b
Add install.yaml custom prompt and add confirmation banner for genera…
cayb0rg Jun 18, 2024
5359ec0
Add warning to generator dialog
cayb0rg Jun 18, 2024
284ae09
Fix save history selection banner
cayb0rg Jun 18, 2024
0d60607
Return qset version with qset
cayb0rg Jun 20, 2024
5038033
Switch storage driver to S3
cayb0rg Jun 27, 2024
9541ded
Remove unnecessary plugin
cayb0rg Jun 27, 2024
90b33cd
Fix undefined array key error without an .env.local
cayb0rg Jun 27, 2024
aa8683a
Start a different fakes3 container for running tests
cayb0rg Jun 27, 2024
7525512
Add object locking
cayb0rg Jun 28, 2024
8bd3c95
Disable object locking on fakes3 and fix fakes3 volume mounts
cayb0rg Jul 1, 2024
f727d44
Merge branch 'dev/10.2.0' into s3
cayb0rg Jul 1, 2024
9713243
Test delete functionality; add commented section for deletion from S3
cayb0rg Jul 1, 2024
17ff28f
creatorcore prompt generation endpoint basic implementation
clpetersonucf Jul 9, 2024
3fb8fe5
synced with master, resolved merge conflicts
clpetersonucf Jul 17, 2024
ecc2269
Added retry: false to react queries with error states
clpetersonucf Jul 19, 2024
bcb16ae
Added retry false to scoreSummary query
clpetersonucf Jul 23, 2024
b4a8efe
Merge pull request #1596 from clpetersonucf/issue/1594-improve-react-…
clpetersonucf Jul 24, 2024
d9f5547
Adjusts widget pre-embed views with improved layout and footer that i…
clpetersonucf Jul 24, 2024
be9c848
Change default storage driver to file & other misc changes in respons…
cayb0rg Jul 24, 2024
92a8b70
Merge commit '3fb8fe5e34493eb5ed6e9fb3686d8df52433d5e0' into s3
cayb0rg Jul 24, 2024
d2cba14
Tweaks asset configs. Additions to readmes.
clpetersonucf Jul 26, 2024
5e495a3
Experimental support for imds credentialing for aws s3 sdk
clpetersonucf Jul 30, 2024
1f263ea
Fixed references to config in s3 driver. Added missing credential con…
clpetersonucf Jul 31, 2024
3620362
s3 client config only uses endpoint with fakes3. Object locking disab…
clpetersonucf Jul 31, 2024
7d17e13
Removes endpoint from base s3 client config oops. S3 keys now match f…
clpetersonucf Aug 1, 2024
b04058e
Fuel/core updated in composer lockfile
clpetersonucf Aug 1, 2024
6161f08
docs and comment polish
clpetersonucf Aug 2, 2024
614c3f5
Comment updates to base env
clpetersonucf Aug 2, 2024
ac3eca5
Essential references to docker-compose updated to v2
clpetersonucf Aug 2, 2024
ab288f6
gh actions and scripts using docker-docker v1 now use docker compose …
clpetersonucf Aug 2, 2024
431fa80
Merge branch 'dev/10.3.0' into s3
clpetersonucf Aug 2, 2024
9b5f41e
Merge pull request #1597 from clpetersonucf/issue/1590-improve-pre-em…
clpetersonucf Aug 2, 2024
087030c
Merge pull request #1588 from cayb0rg/s3
clpetersonucf Aug 5, 2024
8420695
Resolving composer conflicts in dev/10.3.0 update
clpetersonucf Aug 6, 2024
6acfbf0
Add the majority of dark mode styling and graphics
SimonRothUCF Aug 13, 2024
2af9ecd
Refactored generation code and relocated generation logic to new ques…
clpetersonucf Aug 19, 2024
6d805c4
Additional fixes
clpetersonucf Aug 19, 2024
67f252f
Reworked setting & acquisition of is_generable flag. Rewired generati…
clpetersonucf Aug 20, 2024
e4c2dcd
Untitled, unsaved instance names now update to prompt topic when gene…
clpetersonucf Aug 23, 2024
7adf0a8
is_generable flag will always return false for non-authenticated user…
clpetersonucf Aug 23, 2024
38172e9
Small style and UX tweaks to question generation modal & confirm bar
clpetersonucf Aug 23, 2024
5030a29
Reworks/additions to generation class to allow for openai OR azure op…
clpetersonucf Aug 28, 2024
e32afb5
forgot a paren, oops
clpetersonucf Aug 28, 2024
88d194e
Updated docker env with new placeholder generation variables
clpetersonucf Aug 28, 2024
8445aae
Improves error messaging in question generator
clpetersonucf Sep 4, 2024
c322c50
Fixes method by which generator grabs the qset for question generation
clpetersonucf Sep 5, 2024
0e820a5
Updates save draft button on cancel without whitespace monster
chrissolanilla Sep 5, 2024
007710e
runnign tests
chrissolanilla Sep 5, 2024
46fd175
reverts text back to 'Save Draft' after 5 seconds
chrissolanilla Sep 5, 2024
62a6671
checks the length of the title before saving
chrissolanilla Sep 6, 2024
bc07c5c
converts spaces to tabs and returns false
chrissolanilla Sep 9, 2024
ba83238
updates react to latest and uses createRoot
chrissolanilla Sep 9, 2024
549f736
Merge pull request #1604 from chrissolanilla/1598/title-length-limit
clpetersonucf Sep 9, 2024
8aa43a0
Generation dialog UX tweaks
clpetersonucf Sep 10, 2024
27fb45e
Merge branch 'dev/10.3.0' of https://github.com/ucfopen/Materia into …
chrissolanilla Sep 10, 2024
82b7610
adds a null check on _pics since it renders first without getting the…
chrissolanilla Sep 10, 2024
34ea69b
Addl error boundaries in generation endpoint. Updates tests.
clpetersonucf Sep 12, 2024
4f1d75e
Slight increase to generation dialog description text
clpetersonucf Sep 12, 2024
abaf383
WIP merge conflict resolution; updated with base question generation …
clpetersonucf Sep 13, 2024
b39eebd
Fleshed out CreatorCore prompt submit and receipt methods
clpetersonucf Sep 17, 2024
a3e6b3c
Reworks several error boundaries. Fixes default docker env. Ensures e…
clpetersonucf Sep 17, 2024
cdc89ee
Merge upstream changes from question-generation branch
clpetersonucf Sep 17, 2024
19542e1
Add dark mode graphics
SimonRothUCF Sep 17, 2024
02d6cfe
Resolve merge conflicts
SimonRothUCF Sep 17, 2024
0fa59af
Fix to previous fixes. Adds format param to generator query method.
clpetersonucf Sep 17, 2024
7a2ab91
Bringing in upstream changes (again lol)
clpetersonucf Sep 17, 2024
dd5a4bb
Tweaks to AI response handling for prompts
clpetersonucf Sep 17, 2024
e1f5c9e
Simplified env imports to docker-compose override
clpetersonucf Sep 17, 2024
7b9233f
Changes generation enabled error boundary. Updates dev docker compose…
clpetersonucf Sep 17, 2024
53addd4
yet another upstream merge
clpetersonucf Sep 17, 2024
7f63e1f
Updated error boundary for prompt generation endpoint and tests
clpetersonucf Sep 17, 2024
9181291
Updates composer json and lockfile to materia-theme-ucf v2.0.4
clpetersonucf Sep 17, 2024
20a6ae4
Comments & code cleanup
clpetersonucf Sep 18, 2024
0824dbb
Adds step to build action to circumvent missing .env.local
clpetersonucf Sep 19, 2024
68faba4
Fix a few remaining style issues
SimonRothUCF Sep 19, 2024
57c05ce
Bring branch up to date with 10.3.0
SimonRothUCF Sep 19, 2024
2a5c740
replaces double quotes with single quotes and returns false inline
chrissolanilla Sep 23, 2024
c6391a9
replaces spaces with tabs and creates a new useEffect and reduces red…
chrissolanilla Sep 23, 2024
8700956
Removes unnecessary style duplicates for darkmode across several comp…
clpetersonucf Sep 23, 2024
9bbfa29
Removes illustrator source file from public/img
clpetersonucf Sep 23, 2024
568239d
Merge pull request #1 from clpetersonucf/darkmode/removing-redundant-…
SimonRothUCF Sep 25, 2024
38f659d
Added 'uses_prompt_generation' property to Widget
fudgeu Sep 25, 2024
a6458a0
Merge pull request #1608 from clpetersonucf/materia-theme-ucf-v204
clpetersonucf Sep 30, 2024
03026a4
Complete uses_prompt_generation property
fudgeu Oct 1, 2024
b12e8c9
Whoopsie fixed a typo
fudgeu Oct 1, 2024
58421ff
Added semester param to instance score history call in score module
clpetersonucf Oct 1, 2024
63519d2
Small adjustments to question generation dialog formatting
clpetersonucf Oct 1, 2024
bb60efb
Merge branch 'dev/10.3.0' into question-generation
clpetersonucf Oct 2, 2024
d562ad1
generation dialog input visual emphasis
clpetersonucf Oct 2, 2024
10c249c
Merge pull request #1602 from chrissolanilla/1600/save-draft-button
clpetersonucf Oct 2, 2024
7fcfc31
updated comments in docker/.env and .env
clpetersonucf Oct 2, 2024
425fe05
Removed errant console log
clpetersonucf Oct 2, 2024
0c79507
Merge branch 'dev/10.3.0' into question-generation
clpetersonucf Oct 2, 2024
7b4655a
Merge pull request #1582 from cayb0rg/question-generation
clpetersonucf Oct 2, 2024
c20ec6f
Merge pull request #7 from fudgeu/feature/creator-core-prompt-generat…
clpetersonucf Oct 2, 2024
dfd18f1
Remove custom cookie class
fudgeu Oct 7, 2024
ebafb24
Update config to use Secure and SameSite attributes
fudgeu Oct 14, 2024
4885c0a
Fix SameSite cookie attribute
fudgeu Oct 14, 2024
7669ad9
Restore old SameSite behavior if not HTTPS
fudgeu Oct 14, 2024
d4e5eb0
Merge branch 'dev/10.3.0' into issue/1607-retire-cookie-class
clpetersonucf Oct 15, 2024
69f00dc
Merge pull request #1612 from clpetersonucf/issue/1611-fix-for-score-…
clpetersonucf Oct 21, 2024
4a4bf30
Added env flag to signify if server is HTTPS or not
fudgeu Oct 24, 2024
08226a0
SameSite always set to None
fudgeu Oct 24, 2024
524d2a5
WIP changes to build workflow and run_first script
clpetersonucf Oct 24, 2024
e6c2c59
Merge pull request #1591 from clpetersonucf/feature/creator-core-prom…
clpetersonucf Oct 28, 2024
978f98b
Merge pull request #1615 from fudgeu/issue/1607-retire-cookie-class
clpetersonucf Oct 29, 2024
d9477f4
Updates base compose file. Updates test_and_build gh action to publis…
clpetersonucf Oct 29, 2024
dc4efda
Merge branch 'dev/10.3.0' into issue/1616-run-first-script-updates
clpetersonucf Oct 29, 2024
684f5e4
Merge pull request #1617 from ucfopen/issue/1616-run-first-script-upd…
clpetersonucf Oct 29, 2024
f21d5ef
Updates to docker/readme
clpetersonucf Oct 29, 2024
2ff3358
Merge branch 'dev/10.3.0' into 1605/Replace-Render
clpetersonucf Oct 29, 2024
c7af5dd
replaces double quotes with single quotes and removes react query dev…
clpetersonucf Oct 29, 2024
260e8fc
Merge pull request #1606 from chrissolanilla/1605/Replace-Render
clpetersonucf Oct 30, 2024
6caddcd
Adds sick new Materia graphic at run_first init
clpetersonucf Oct 30, 2024
f6128a5
run_first checks for .env.local in docker/
clpetersonucf Nov 1, 2024
28da569
Restores composer and build_assets steps in run_first to address dock…
clpetersonucf Nov 4, 2024
92b7711
Clean up unnecessary styles and fix issues detailed in Dark Mode pull…
SimonRothUCF Nov 7, 2024
5b25a35
Major rework to setup process. split run_first, reworked dev envs, co…
clpetersonucf Nov 13, 2024
7f9a8e5
Creates .env.local for gh tests
clpetersonucf Nov 13, 2024
e5317fa
Updates to docker test configuration
clpetersonucf Nov 13, 2024
1376564
git ignores compiled js/css in public, fix for nondev nginx config
clpetersonucf Nov 14, 2024
48fad22
Incorporating dev/10.3.0 history
clpetersonucf Nov 14, 2024
b7e6bc5
Fakes3 gets built from dev compose in gh action
clpetersonucf Nov 14, 2024
0f57a9f
override compose file missing network configs, build process now uses…
clpetersonucf Nov 14, 2024
6a18934
docker ip in nondev run_first now configurable. writes urls env vars …
clpetersonucf Nov 14, 2024
97b7b22
Restores uploaded_widgets volume mount for app container
clpetersonucf Nov 14, 2024
1b63662
Restores missing FUEL_ENV value in docker/.env
clpetersonucf Nov 15, 2024
35efc33
docker volume mounting tweaks to nondev script
clpetersonucf Nov 18, 2024
6770be1
Significant rework to base README and docker README
clpetersonucf Nov 19, 2024
2d7a2cf
nondev setup now enables mysql credential config
clpetersonucf Nov 19, 2024
af14b40
Fix widget filtering logic
fudgeu Nov 19, 2024
fbff4ce
README additions. Authentication section still WIP.
clpetersonucf Nov 20, 2024
af7cfaf
Updated with changes from dev/10.3.0 again
clpetersonucf Nov 20, 2024
94a3e76
Fix syntax error in nondev script
clpetersonucf Nov 20, 2024
e765da0
Revamp widget individual scores table
fudgeu Nov 20, 2024
bf454c3
Finish individual scores table styling
fudgeu Nov 21, 2024
2d34264
Added scrollbars to prevent overflow, a11y changes
fudgeu Nov 21, 2024
9bb3953
Fix import styling to be consistent
fudgeu Nov 21, 2024
18bb1e7
More docker readme additions
clpetersonucf Nov 22, 2024
1d60216
Even more README additions
clpetersonucf Nov 25, 2024
192ea7e
Addl (final?) refinements to docker compose, plus env cleanup and com…
clpetersonucf Nov 25, 2024
86e46f9
Fix to env var references in test compose override
clpetersonucf Nov 25, 2024
116f577
The readme updates never stop
clpetersonucf Nov 26, 2024
a7dabad
Even more readme edits
clpetersonucf Nov 26, 2024
353f7f9
Merge pull request #1620 from ucfopen/issue/1616-run-first-script-upd…
clpetersonucf Nov 26, 2024
d9ed5a6
README typos
clpetersonucf Nov 26, 2024
1cdd878
Even more readme fixes
clpetersonucf Nov 26, 2024
f41003f
Merge pull request #1622 from fudgeu/issue/1618
clpetersonucf Nov 26, 2024
1f269bf
Merge pull request #1623 from fudgeu/issue/1619
clpetersonucf Nov 26, 2024
77f3b1a
Even more upstream changes from dev/10.3.0
clpetersonucf Nov 26, 2024
084ef34
Minor settings page cleanup. Replaced browser default radio + checkbo…
clpetersonucf Nov 26, 2024
a36ad32
General tweaks and improvements to profile, my widgets pages
clpetersonucf Dec 2, 2024
0ae8e0c
Yet another merge with upstream changes from dev/10.3.0
clpetersonucf Dec 3, 2024
d49d086
Lots of misc polish and fixes to my widgets dark mode styling; tweaks…
clpetersonucf Dec 3, 2024
9144237
Tweaks to admin pages, header logo, generator modal, and score screen
clpetersonucf Dec 3, 2024
d72d8ea
Committing missing svg logos associated with prior commit
clpetersonucf Dec 3, 2024
abeb5e5
Additional tweaks: player, pre-embed, profile, and LTI views
clpetersonucf Dec 4, 2024
f74cad9
Guide page, help page, support page, profile page tweaks
clpetersonucf Dec 4, 2024
e9dff02
Logo file cleanup. Modest tweaks to font rendering across various pages.
clpetersonucf Dec 5, 2024
5769e93
Merge pull request #1609 from SimonRothUCF/react/dark-mode
clpetersonucf Dec 5, 2024
22bb7bb
small dark mode style fixes based on feedback
clpetersonucf Dec 5, 2024
e19dad0
Additional post-dark mode style fixes
clpetersonucf Dec 6, 2024
8cc5f2f
Adds baseline accessibility page
clpetersonucf Dec 6, 2024
4bbaa4b
Merge pull request #1624 from clpetersonucf/issue/1587-accessibility-…
clpetersonucf Dec 6, 2024
f87da13
Updates materia-theme-ucf to v2.0.5 in composer
clpetersonucf Dec 6, 2024
827fcd6
Fixed notifications display issue, font rendering tweak
clpetersonucf Dec 9, 2024
95096ca
fixes prev attempt hover behavior and individual scores key warning
clpetersonucf Dec 9, 2024
9043453
Removed duplicate styles & fixed default bg color for save history di…
clpetersonucf Dec 10, 2024
24da5ad
Adds dark mode styling to media importer
clpetersonucf Dec 10, 2024
51d5ef2
Merge pull request #1625 from clpetersonucf/dev-10.3.0-final-fixes
clpetersonucf Dec 10, 2024
28334f4
style fixes for LTI embed views & help page links
clpetersonucf Dec 10, 2024
078e06c
Updates embedded only radio in settings dialog, fixed darkmode logo r…
clpetersonucf Dec 11, 2024
a0ebbf7
Reduced expiration duration for static assets in prod nginx config
clpetersonucf Dec 11, 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
86 changes: 58 additions & 28 deletions .env
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# =========================
# =================================
# CONFIGURE MATERIA
# 1. Copy `.env` to `.env.local` (make changes in .env.local)
# 2. Set every `<MUST_SET>` value
# 3. Comb through for any other settings you may wish to change
# 4. Visit Materia in browser, check logs in fuel/app/logs for debugging
#
# DETAILED INSTRUCTIONS
# !!! View the Materia README for options, descriptions & permitted values !!!
# This .env file is not referenced by the default development & nondev docker stack! Use docker/.env.local instead.
# It's recommended to use this .env file as a template for production.
# Your docker compose file(s) will need to be updated to reference your final .env and its relative path in the env_file: directive of each service.
#
# DETAILED INSTRUCTIONS FOR PRODUCTION USE
#
# Only `BOOL_` options become boolean values, and ONLY `true` evaluates to true
# 1. If coming from a nondev instance, copy relevant values from docker/.env.local
# 2. Set every `<MUST_SET>` value
# 3. Review remaining optional settings
# 4. Update your docker compose file(s) to point to the final .env file and location. Services should use the `env_file:` directive to include env vars as required
# 5. Remove any dev `environment:` references in compose file(s) if they are present
# 6. Start docker containers (or stop, rm, and restart if already running)
# 7. Visit Materia in browser, check logs in fuel/app/logs for debugging
#
# Docker/Dev notes:
# docker/config/materia-docker.env.local is loaded instead of .env.local
# Refer to docker/README.md for more information about environment configs
#
# !! NOTE: Only `BOOL_` options become boolean values, and ONLY `true` evaluates to true

# GENERAL ===================
# GENERAL ==========================

FUEL_ENV=production
#DATABASE_URL=<MUST_SET>
Expand All @@ -24,38 +30,46 @@ BOOL_SEND_EMAILS=false
#FUEL_ALWAYS_LOAD_MODULES=""
#GOOGLE_ANALYTICS_ID=xxx

# LOGGING ===================
# LOGGING ==========================

#FUEL_LOG_THRESHOLD=300
#LOG_HANDLER=DEFAULT

# ASSETS ===================
# ASSETS ===========================

#URLS_STATIC=
#URLS_ENGINES=
#URLS_STATIC= # Set if static files and assets come from a different domain. While used in dev, not required for prod
#URLS_ENGINES= # same as above
#BOOL_ADMIN_UPLOADER_ENABLE=true
#ASSET_STORAGE_DRIVER=file
#ASSET_STORAGE_S3_REGION=us-east-1
#ASSET_STORAGE_S3_BUCKET=
#ASSET_STORAGE_S3_BASEPATH=
#ASSET_STORAGE_S3_KEY=
#ASSET_STORAGE_S3_SECRET=
ASSET_STORAGE_DRIVER=file # file | s3 | db (db not recommended)

# AWS S3 ===========================
# Note: the <MUST_SET> options here are only required if S3 storage driver is enabled

# SESSION & CACHE ===================
# ASSET_STORAGE_S3_CREDENTIAL_PROVIDER= # env | imds
# ASSET_STORAGE_S3_BUCKET=<MUST_SET>
# ASSET_STORAGE_S3_ENDPOINT= # not required for S3 on AWS
# ASSET_STORAGE_S3_KEY=<MUST_SET>
# ASSET_STORAGE_S3_SECRET=<MUST_SET>
# ASSET_STORAGE_S3_REGION=
# ASSET_STORAGE_S3_BUCKET=
# ASSET_STORAGE_S3_BASEPATH=
# AWS_SESSION_TOKEN=<MUST_SET> # STS token for s3 development. Not required if using imds

# SESSION & CACHE ==================

#MEMCACHED_HOST=localhost
#MEMCACHED_PORT=11211
#CACHE_DRIVER=file
#SESSION_DRIVER=file
#CACHE_DRIVER=file # memcached | file
#SESSION_DRIVER=file # memcached | file | db
SESSION_EXPIRATION=21600

# THEME ===================
# THEME ============================

#THEME_ACTIVE=default
# relative to /fuel/packages/
#THEME_PACKAGE=materia-theme-ucf

# AUTH ===================
# AUTH ============================

#AUTH_DRIVERS=Materiaauth
#AUTH_SALT=<MUST_SET>
Expand All @@ -67,14 +81,14 @@ SESSION_EXPIRATION=21600
#USER_INSTRUCTOR_PASSWORD
#USER_STUDENT_PASSWORD

# CRYPTO ===================
# CRYPTO ==========================

#CRYPTO_KEY=<MUST_SET>
#CRYPTO_IV=<MUST_SET>
#CRYPTO_HMAC=<MUST_SET>
#CIPHER_KEY=<MUST_SET>

# LTI ===================
# LTI ============================

#BOOL_LTI_RESTRICT_LOGINS_TO_LAUNCHES=false
#LTI_GUID=
Expand All @@ -88,3 +102,19 @@ LTI_KEY="materia-production-lti-key"
#BOOL_LTI_USE_LAUNCH_ROLES=true
#BOOL_LTI_GRACEFUL_CONFIG_FALLBACK=true
#BOOL_LTI_LOG_FOR_DEBUGGING=false

# QUESTION GENERATION ===========
# Note: <MUST_SET> options are only required if GENERATION_ENABLED is true

#GENERATION_ENABLED=true
#GENERATION_ALLOW_IMAGES=false
#GENERATION_API_PROVIDER=<MUST_SET> # openai | azure_openai
#GENERATION_API_KEY=<MUST_SET>
#GENERATION_API_ENDPOINT= # required for azure
#GENERATION_API_VERSION= # required for azure
#GENERATION_API_MODEL= # required for openai
#GENERATION_LOG_STATS=true # optional. stats are logged to debug threshold.

# WEBSERVER =====================

#IS_SERVER_HTTPS=true # defaults to true, only set to false if required
41 changes: 32 additions & 9 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
uses: actions/checkout@v2

- name: Run Tests
run: cd docker && ./run_tests_ci.sh
run: cd docker && touch .env.local && ./run_tests_ci.sh

docker_images_and_release_zip:
needs: ci_tests
Expand All @@ -29,17 +29,40 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Build App Image
- name: Create .env.local to satisfy build requirements
run: |
cd docker
docker-compose build --no-cache webserver app
if [ ! -f .env.local ]; then
touch .env.local
fi
- name: Push App Images
- name: Build App and Webserver Images
run: |
docker tag ucfopen/materia:app-dev ghcr.io/${{ github.repository_owner }}/materia:app-${{ github.sha }}
docker tag ucfopen/materia:app-dev ghcr.io/${{ github.repository_owner }}/materia:app-${{ steps.tag_name.outputs.GIT_TAG }}
docker tag ucfopen/materia:webserver-dev ghcr.io/${{ github.repository_owner }}/materia:webserver-${{ github.sha }}
docker tag ucfopen/materia:webserver-dev ghcr.io/${{ github.repository_owner }}/materia:webserver-${{ steps.tag_name.outputs.GIT_TAG }}
cd docker
docker compose build --no-cache webserver app
docker compose -f docker-compose.yml -f docker-compose.development.yml build --no-cache fakes3
- name: Push Dev App and Webserver Images
if: ${{ startsWith(github.ref, 'refs/tags/v') && (contains(github.ref, '-alpha') || contains(github.ref, '-rc')) }}
run: |
docker push ghcr.io/${{ github.repository_owner }}/materia:app-dev
docker push ghcr.io/${{ github.repository_owner }}/materia:webserver-dev
docker push ghcr.io/${{ github.repository_owner }}/materia:fake-s3-dev
- name: Push Stable App and Webserver Images
if: ${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-alpha') && !contains(github.ref, '-rc') }}
run: |
docker tag ghcr.io/${{ github.repository_owner }}/materia:app-dev ghcr.io/${{ github.repository_owner }}/materia:app-stable
docker tag ghcr.io/${{ github.repository_owner }}/materia:webserver-dev ghcr.io/${{ github.repository_owner }}/materia:webserver-stable
docker push ghcr.io/${{ github.repository_owner }}/materia:app-stable
docker push ghcr.io/${{ github.repository_owner }}/materia:webserver-stable
- name: Push Versioned App and Webserver Images
run: |
docker tag ghcr.io/${{ github.repository_owner }}/materia:app-dev ghcr.io/${{ github.repository_owner }}/materia:app-${{ github.sha }}
docker tag ghcr.io/${{ github.repository_owner }}/materia:app-dev ghcr.io/${{ github.repository_owner }}/materia:app-${{ steps.tag_name.outputs.GIT_TAG }}
docker tag ghcr.io/${{ github.repository_owner }}/materia:webserver-dev ghcr.io/${{ github.repository_owner }}/materia:webserver-${{ github.sha }}
docker tag ghcr.io/${{ github.repository_owner }}/materia:webserver-dev ghcr.io/${{ github.repository_owner }}/materia:webserver-${{ steps.tag_name.outputs.GIT_TAG }}
docker push ghcr.io/${{ github.repository_owner }}/materia:app-${{ github.sha }}
docker push ghcr.io/${{ github.repository_owner }}/materia:app-${{ steps.tag_name.outputs.GIT_TAG }}
docker push ghcr.io/${{ github.repository_owner }}/materia:webserver-${{ github.sha }}
Expand All @@ -63,7 +86,7 @@ jobs:
overwrite: true

- name: Upload to Pre-Release
if: ${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-alpha') && contains(github.ref, '-rc') }}
if: ${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-alpha') || contains(github.ref, '-rc') }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ nbproject/

# custom config
.env.local
.env.local.mysql

# hidden files created by Windows
Thumbs.db
Expand Down Expand Up @@ -85,6 +86,7 @@ public/js/materia.storage.table.js
public/js/student.js
public/js/vendor/*

public/openai_usage.txt

# Installed Widgets
public/widget
Expand Down Expand Up @@ -122,3 +124,9 @@ public/dist/*
!public/dist/package.json
!public/dist/path.js
!public/dist/README.md

public/js
public/css

# docker override is now untracked as of v10.3.0
docker/docker-compose.override.yml
110 changes: 85 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,54 @@ While casual references to _Materia_ typically involve both the platform and its

## Installation

Materia is configured to use Docker containers in production environments, orchestrated through docker compose, though other orchestration frameworks could potentially be used instead. While it may be possible to deploy Materia without Docker, we **do not recommend doing so**.
Materia is configured to use docker containers in production environments, orchestrated through docker compose, though other orchestration frameworks could potentially be used instead. While it may be possible to deploy Materia without docker, we **do not recommend doing so**.

### Docker Deployment

We publish production ready docker and nginx containers in the [Materia Docker repository](https://github.com/orgs/ucfopen/packages/container/package/materia). For more info on using Docker in Production, read the [Materia Docker Readme](docker/README.md)
Refer to the [Materia docker readme](docker/README.md) for a full breakdown of Materia's docker configuration and deployment in both development and production.

### Configuration

Visit the [Server Variables](https://ucfopen.github.io/Materia-Docs/admin/server-variables.html) page on our docs site for information about configuration through environment variables.
Materia uses environment variables to facilitate application and webserver configuration. These are typically sourced from `.env` or `.env.local` files on the host machine that are volume mounted into their associated containers.

## Development
Visit docker README as well as the [Server Variables](https://ucfopen.github.io/Materia-Docs/admin/server-variables.html) page on our docs site for information about configuration through environment variables. The [root env file](.env) serves as a configuration template for production instances of Materia.

Code contributors should review the [CONTRIBUTING](CONTRIBUTING.md) document before proceeding.
## Setup

Materia provides a pair of setup scripts for out-of-the-box deployment based on two different use cases:

1. `run_first_for_dev.sh` sets up and configures your local instance of Materia for development. This includes additional volume mounts for project files and makes use of additional containers for mysql, s3, and memcached.
2. `run_first_for_nondev.sh` is ideal for users who just want to explore Materia locally and potentially transition to a production instance. The script dynamically configures the override compose file based on selections you make in the script.

### Local Dev with Docker
> [!NOTE]
> `yq` is required for the nondev script. This may come preinstalled in some OS distributions but you should ensure the correct version is installed. Consult the [yq installation guide](https://github.com/mikefarah/yq?tab=readme-ov-file#install) for more info.
Get started with a local dev server:
In either case, first-time setup involves the following:

```
git clone https://github.com/ucfopen/Materia.git
cd Materia/docker
```

./run_first.sh
Followed by either:
```
./run_first_for_dev.sh
```
For local development or

The `run_first.sh` script only has to be run once for initial setup. Afterwards, your local copy will persist in a docker volume unless you explicitly use `docker-compose down` or delete the volume manually.
```
./run_first_for_nondev.sh
```
For creating a local instance where development is not desired.

Use `docker-compose up` to run your local instance. The compose process must persist to keep the application alive. Materia is configured to run at `https://127.0.0.1` by default.
The `run_first` scripts only have to be run once for initial setup. Afterwards, your local copy will persist in a docker volume unless you explicitly use `docker compose down` or delete the volumes manually.

In a separate terminal window, run `yarn dev` to enable the webpack dev server and live reloading while making changes to JS and CSS assets.
Use `docker compose up` to run your local instance. The compose process must persist to keep the application alive. Materia is configured to run at `https://localhost` by default.

Note that Materia uses a self-signed certificate to facilitate https traffic locally. Your browser may require security exceptions for both `127.0.0.1:443` and `127.0.0.1:8008`.
Note that Materia uses a self-signed certificate to facilitate https traffic locally. Your browser may require security exceptions for your application on ports `443` and `8008` (if setup for local development).

More info about Materia Docker can be found in the [Materia Docker Readme](docker/README.md)
> [!NOTE]
> If local development of static assets (JS and CSS) is desired, run `yarn dev` in a separate terminal window to enable the webpack dev server and live reloading. This requires node and yarn to be installed on the host machine.
### Creating additional users

Expand All @@ -66,20 +79,14 @@ See the wiki page for [Creating a local user](https://github.com/ucfopen/Materia

Tests run in the docker environment to maintain consistency. View the `run_tests_*.sh` scripts in the docker directory for options.

#### Running A Single Test Group

Inspect the actual test command in `/.run_tests.sh` for guidance, but as of the time of writing this, you can run a subset of the tests in the docker environment to save time.

The following command will run just the **Oauth** tests rather quickly:

```
./run_tests.sh --group=Oauth
```

### Git Hooks

There is a pre-commit hook available to ensure your code follows our linting standards. Check out the comments contained inside the hook files (in the githooks directory) to install it, you may need a few dependencies installed to get linting working.

## Contributing

Code contributors should review the [CONTRIBUTING](CONTRIBUTING.md) document before proceeding.

## Authentication

Materia supports two forms of authentication:
Expand All @@ -89,4 +96,57 @@ Materia supports two forms of authentication:

## Asset Storage

Materia enables users to upload media assets for their widgets, including images and audio. There are two asset storage drivers available out of the box: `file` and `db`. `file` is the default asset storage driver, which can be explicitly set via the `ASSET_STORAGE_DRIVER` environment variable.
Users can upload media assets (images and audio) for use in their widgets, facilitated through a media importer that is provided by Materia itself. Asset storage drivers include:

- `file`: Assets are stored on the local filesystem of the application. It is recommended that assets are backed up and synced with an external storage solution (such as S3) to ensure the files persist across application instances.
- `s3`: Files are uploaded to and requested directly from AWS S3. This is the most straightforward and recommended storage driver option. Be sure to consult the [Materia Docker Readme](docker/README.md) for additional environment variables associated with using S3.
- `db`: This storage driver stores asset binaries directly in the database. This option allows Materia to run on cloud hosting options with very limited storage volumes. The `db` storage driver option is not recommended for general use.

> [!WARNING]
> The `db` asset storage driver option is deprecated and will be removed in the next major version of Materia.
The storage driver is configured via the `ASSET_STORAGE_DRIVER` environment variable.

### Local Asset Storage With S3

A `fakes3` container is instantiated as part of the default development stack and the `ASSET_STORAGE_DRIVER` environment variable is set to `s3` by default in the development `.env` file located in `docker/.env`. When using `fakes3`, this is all that is required to simulate S3 usage locally.

To use an actual S3 bucket for local dev:

1. Set `DEV_ONLY_FAKES3_DISABLED` environment variable in `docker/.env` to `true`
2. Set `ASSET_STORAGE_S3_BUCKET` to your bucket name
3. Set `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` in `.env.local`. (Tip: You can run `aws configure export-credentials --profile YOUR_PROFILE_NAME --format env-no-export` to get these)

> [!NOTE]
> Note that `fakes3` asset storage is disabled when `FUEL_ENV` is set to `production`.
## Widget Management

A default list of widgets will be installed as part of the first-time setup process, but the widget ecosystem has many more! Peruse the [Materia Widget Gallery](https://ucfopen.github.io/materia-widget-gallery/) to view additional widgets to install.

### Installing Widgets

Widgets can be installed in one of two ways:

1. A user with the `super_user` role can visit the Widget Admin panel by navigating to `your.materia.url/admin/widget` or by selecting the orange "Admin" button at the top. Select a `.wigt` file from the file upload dialog to install it.
2. Widgets can be installed from the cli on the application container once running:

```
$ docker exec -it <container name or id> sh
$ wget url/for/materia/widget.wigt
$ php oil r widget:install widget.wigt
```

The `.wigt` files do not need to be retained once a widget is installed.

## Theming

Theme overrides are facilitated through FuelPHP packages, installed via composer. Materia ships with `Materia-Theme-UCF` by default.

Review the [repository README](https://github.com/ucfopen/Materia-Theme-UCF) for `Materia-Theme-UCF` for a breakdown of using theme overrides in Materia 10.x and later.

## Transitioning to Production

More information about creating a production-capable Materia instance can be found in the [Materia Docker Readme](docker/README.md).


Loading
Loading