Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
6d3d02b
(fix): update docker images and pin python dependencies (#1)
mpfeil Oct 5, 2023
25da742
(chore): docker best pratices (#2)
mpfeil Oct 6, 2023
6291786
chore(build): add github action to build server (#4)
mpfeil Oct 23, 2023
59ff7f8
server: Get tests to run (#5)
timber-they Jan 6, 2024
0299348
server: IntegrityError when changing issuer staff role back and forth…
timber-they Jan 6, 2024
89a76ee
ui: Getting logged out when searching for an image (#7)
timber-they Jan 6, 2024
7a3c7c9
Server fix flake8 warnings (#8)
timber-they Jan 22, 2024
0b6f0c3
Server configure email templates (#9)
YouQam Feb 12, 2024
a78f3ed
bug-fix in email template (#12)
YouQam Feb 19, 2024
9f3f739
Creating badge fails (#16)
timber-they Feb 19, 2024
6e9a36c
Admin interface returns error 500 (#20)
timber-they Feb 22, 2024
c28b109
Feat/collectionbadges (#23)
jona159 Mar 6, 2024
39421e0
Automate production deployment (#24)
timber-they Mar 6, 2024
23045aa
Issuer cant be edited on empty address (#26)
timber-they Mar 6, 2024
e3600cc
Don't hardcode backend url in mail template (#37)
timber-they Mar 21, 2024
ba936e8
fix nounproject query (#30)
umut0 Mar 21, 2024
2088966
add mailhog to docker compose and use smtp email backend in local dev…
umut0 Mar 21, 2024
7b2c708
Test/create competencies (#36)
jona159 Mar 22, 2024
f42dc4c
Don't double https with invalid cors configuration (#42)
timber-they Mar 25, 2024
43b298a
send email to issuer on verification (#31)
umut0 Mar 25, 2024
377f1e3
include extensions in serializer (#44)
jona159 Mar 25, 2024
de58c90
View of institution doesn't work (#35)
timber-they Mar 26, 2024
3950cf8
Revert "Feat/collectionbadges (#23)" (#28)
jona159 Mar 27, 2024
a5a6205
Feat/incorporate ai feature (#46)
timber-they Apr 3, 2024
8ea88cd
Fix badge creation 504 (#48)
timber-they Apr 4, 2024
33143f4
Create badge: AI-Tool doesn't work #160 (#49)
timber-they Apr 10, 2024
32fae80
Feat/migrate django (#58)
jona159 Apr 15, 2024
f88cac8
Also install wheel (#73)
timber-they Apr 16, 2024
8bf90b3
Parse 500 errors from AI endpoint (#72)
timber-they Apr 16, 2024
7b6504b
remove newline within blocks (#77)
YouQam Apr 19, 2024
7209c78
add missing endblock tag (#79)
YouQam Apr 19, 2024
e7c94b3
Style/update badge received email (#80)
YouQam Apr 22, 2024
5c9b72c
Fix/update recieved badge email (#83)
YouQam Apr 23, 2024
cda01cf
Bump docker/login-action from 3.0.0 to 3.1.0 (#62)
dependabot[bot] Apr 23, 2024
563670a
Bump docker/metadata-action from 5.0.0 to 5.5.1 (#63)
dependabot[bot] Apr 23, 2024
310cd13
Bump actions/checkout from 4.1.1 to 4.1.3 (#81)
dependabot[bot] Apr 23, 2024
7146659
Bump docker/build-push-action from 5.0.0 to 5.3.0 (#66)
dependabot[bot] Apr 23, 2024
6bc0590
add new routes to expose registering OAUTH Credentials for all regist…
umut0 Apr 26, 2024
d2f7ea7
chore(actions): add workflows to cleanup docker images (#93)
mpfeil May 3, 2024
781cd80
extend build workflow to generate release (#94)
mpfeil May 3, 2024
94fcd3e
Bump actions/checkout from 4.1.3 to 4.1.4 (#89)
dependabot[bot] May 3, 2024
62f9499
Feat/optimize confirmation email (#88)
YouQam May 6, 2024
7cb2dcf
Bump actions/github-script from 6 to 7 (#100)
dependabot[bot] May 7, 2024
b0058e9
Feat/automized issuer verification (#95)
YouQam May 14, 2024
3219897
Fix/password reset (#109)
jona159 May 21, 2024
5c24683
Feat/update signup confirmation email (#111)
umut0 May 21, 2024
0878e69
Feat/generate pdf (#105)
jona159 May 23, 2024
137d8a8
feat: add mbr info box (#118)
YouQam May 27, 2024
81dab95
fix: reset password error (#119)
jona159 May 27, 2024
a15c743
Release from release branch (#123)
timber-they May 27, 2024
864fca8
Feat/add updated at to serializer (#113)
jona159 May 28, 2024
c4aa6d6
Feat/release from release branch (#124)
timber-they May 28, 2024
329556e
Check that only verified issuers create badges (#126)
timber-they May 29, 2024
ae5d202
fix: full_clean validation fails due to entity_id and old_json not ha…
jona159 Jun 4, 2024
63ae067
Also build develop branch (#128)
timber-they Jun 4, 2024
5d5be70
Feat/replace memcached client lib (#133)
jona159 Jun 5, 2024
480ee56
Feat/add imageframe info (#127)
jona159 Jun 7, 2024
1f8e6b6
Feat/resend verification email server (#132)
YouQam Jun 10, 2024
ea22916
Bump docker/login-action from 3.1.0 to 3.2.0 (#130)
dependabot[bot] Jun 10, 2024
78f9efc
Bump django-allauth from 0.46.0 to 0.63.3 (#129)
dependabot[bot] Jun 10, 2024
2cfbae4
Bump actions/checkout from 4.1.4 to 4.1.5 (#104)
dependabot[bot] Jun 10, 2024
4d89e1b
Feat/captcha (#101)
jona159 Jun 10, 2024
2b89fea
Bump djangorestframework from 3.12.2 to 3.15.1 (#71)
dependabot[bot] Jun 10, 2024
9b69203
Bump django-storages from 1.9.1 to 1.14.2 (#67)
dependabot[bot] Jun 10, 2024
dcf6f73
Bump mock from 3.0.5 to 5.1.0 (#70)
dependabot[bot] Jun 10, 2024
bee4e5b
Bump rules from 0.4 to 3.3 (#68)
dependabot[bot] Jun 10, 2024
e693db3
Fix/django allauth azure provider was removed (#138)
timber-they Jun 10, 2024
920e3ac
revert: bump drf (#139)
jona159 Jun 10, 2024
3983d59
Fix/migrations (#149)
jona159 Jun 11, 2024
83ae6e8
Revert/django allauth upgrade (#153)
jona159 Jun 13, 2024
ee37300
Feat/generate pdf (#151)
jona159 Jun 17, 2024
df35179
fix: check if address exists, fixes delete (#159)
umut0 Jun 18, 2024
c07b054
Fix/pdf things (#161)
jona159 Jun 20, 2024
ebc7b32
Feat/oauth meinbildungsraum (#155)
timber-they Jun 25, 2024
53c211d
fix: update information about imageFrame when editing the badge (#166)
jona159 Jun 27, 2024
816f253
Fix/badge award error (#171)
jona159 Jul 1, 2024
73fa6e4
Fix/formatting (#168)
jona159 Jul 2, 2024
3de6e88
fix: pdf permissions (#167)
jona159 Jul 3, 2024
a33301b
fix: remove python-memcached dependency (#175)
timber-they Jul 4, 2024
2baffa5
feat: rework competencies in pdf (#183)
jona159 Jul 11, 2024
a438d7b
Fix/pdf competencies (#186)
jona159 Jul 11, 2024
2fb21b6
fix: footer position and long competency title broke layout (#188)
jona159 Jul 11, 2024
e4b407b
Feat/restyle simple badge award email (#179)
jona159 Jul 17, 2024
b23d0fe
Feat/replace oeb logo (#192)
jona159 Jul 18, 2024
da824c2
fix: remove overlapping graphic (#193)
jona159 Jul 18, 2024
1b1c52e
Feat/change email of institution on ownership change (#182)
timber-they Jul 23, 2024
9c4a429
feat: use new square logo (#199)
jona159 Jul 23, 2024
b5c8ee1
fix: handle all grant types (#202)
timber-they Jul 29, 2024
24ea233
Feat/cronjob cleartokens (#169)
jona159 Jul 30, 2024
0971413
fix: move extract_crontab file to management commands (#208)
jona159 Jul 31, 2024
e761399
Fix/badge received mail (#203)
jona159 Jul 31, 2024
cc75a2f
Fix/update email new logo (#204)
jona159 Jul 31, 2024
4ae259d
feat: use name stored in badge if possible (#207)
timber-they Jul 31, 2024
be5d07c
Feat/enable users to delete their accounts (#200)
timber-they Aug 1, 2024
736d8cc
fix: crontab not found error due to cron not being installed (#210)
jona159 Aug 1, 2024
d2a662a
feat: allow issuers to download the pdf certificates of their awarded…
jona159 Aug 2, 2024
abaa382
Feat/implement pdf userfeedback (#209)
jona159 Aug 3, 2024
c4e9799
fix: update variable names (#214)
jona159 Aug 6, 2024
946e1ce
fix: esco link spacing (#215)
jona159 Aug 6, 2024
1812dc7
Revert/cronjob (#216)
jona159 Aug 7, 2024
bd0a099
Temp/remove premission denied when downlaod a certificate (#222)
YouQam Aug 13, 2024
1318c34
Feat/qr code (#223)
jona159 Aug 14, 2024
9ebca84
feat: also use name stored in badge for email notification (#224)
timber-they Aug 14, 2024
6bb0c21
Fix/merge conflicts (#231)
jona159 Aug 27, 2024
2f23d78
feat: increase description length, handle long competencies (#228)
jona159 Sep 5, 2024
edb5a59
Chore(deps): bump docker/login-action from 3.2.0 to 3.3.0 (#196)
dependabot[bot] Sep 6, 2024
d2e478f
Bump actions/checkout from 4.1.5 to 4.1.7 (#157)
dependabot[bot] Sep 6, 2024
c8105f2
Chore(deps): bump pyopenssl from 24.0.0 to 24.2.1 (#198)
dependabot[bot] Sep 6, 2024
bd60b3d
Bump pypng from 0.0.20 to 0.20220715.0 (#145)
dependabot[bot] Sep 6, 2024
4183ba0
Fix/pdf styles (#236)
jona159 Sep 9, 2024
0d330e3
feat: remove captcha from issuer creation (#235)
jona159 Sep 11, 2024
4ce8a36
Feat/qrcode download (#233)
jona159 Sep 26, 2024
bcca61f
feat: add endpoint for badgerequests by badgeclass (#244)
jona159 Sep 26, 2024
cbb1141
feat: dont include org img twice in every badge request (#243)
jona159 Sep 26, 2024
8489985
fix: check issuerImage (#246)
jona159 Sep 26, 2024
44fa310
fix: isser no image leads to error (#248)
jona159 Sep 27, 2024
8ce58b6
fix: delete issuer after removing membership records (#245)
jona159 Sep 27, 2024
4530eb7
fix: remove special chars from site_name (#251)
jona159 Oct 2, 2024
56d3987
fix: error on user creation (#255)
timber-they Oct 7, 2024
8acc64c
feat: add studyload (#258)
jona159 Oct 10, 2024
7a88810
Chore(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#254)
dependabot[bot] Oct 10, 2024
971c8ad
Chore(deps): bump geopy from 2.2.0 to 2.4.1 (#239)
dependabot[bot] Oct 10, 2024
9f8d46d
Chore(deps): bump docker/build-push-action from 5.3.0 to 6.9.0 (#253)
dependabot[bot] Oct 11, 2024
02fbf0c
fix: add apostrophe (#259)
jona159 Oct 16, 2024
0a6e93e
feat: add script to export all emails from active users (#270)
jona159 Oct 30, 2024
071dbc4
Feat/readd cronjob accestokens (#265)
jona159 Oct 30, 2024
c3473a4
Feat/show version on website and api page (#267)
timber-they Nov 6, 2024
2c2a1a3
Feat/lernpfad (#268)
jona159 Nov 6, 2024
13224f6
Feat/show version on website and api page (#277)
timber-they Nov 6, 2024
21a23a5
feat: set learning path count (#278)
Thiemann96 Nov 7, 2024
07d5e0c
feat: include orgImg (#279)
jona159 Nov 12, 2024
e459006
feat: add prometheus metrics endpoint (#286)
mpfeil Nov 18, 2024
8319f8f
feat: change memcache settings to allow for bigger images (#285)
Thiemann96 Nov 19, 2024
4992bc5
Feat/find issuers using esco (#289)
jona159 Nov 22, 2024
98bb130
New PDF certificates (#281)
Thiemann96 Nov 28, 2024
11a1f66
increase mem size to allow bigger images to be uploaded (#297)
Thiemann96 Dec 3, 2024
f5c959e
Feat/update competency json command (#260)
jona159 Dec 6, 2024
9981d4e
Feat/newsletter emails (#273)
jona159 Dec 6, 2024
b8845e4
fix: migration number (#299)
jona159 Dec 6, 2024
3e5f233
fix: use new competency format for pdf (#303)
jona159 Dec 12, 2024
f1a3523
Fix/assertion link (#306)
jona159 Dec 13, 2024
2b776eb
Feat/store access token in cookie (#287)
timber-they Dec 18, 2024
f8c0ad6
revert: pr due to cors errors (#307)
jona159 Dec 18, 2024
f92a633
Feat/pdf layout adjustments (#308)
jona159 Dec 19, 2024
b46d83c
fix: handle esco url starting without slash (#311)
jona159 Jan 2, 2025
f5724f2
feat: add issuerOwnerAcceptedTos to lp serializer (#313)
jona159 Jan 3, 2025
4952519
Chore(deps): bump docker/build-push-action from 6.9.0 to 6.10.0 (#296)
dependabot[bot] Jan 7, 2025
521523a
Chore(deps): bump docker/metadata-action from 5.5.1 to 5.6.1 (#293)
dependabot[bot] Jan 7, 2025
22eabd6
Chore(deps): bump actions/checkout from 4.2.0 to 4.2.2 (#271)
dependabot[bot] Jan 7, 2025
2561267
Chore(deps): bump docker/build-push-action from 6.10.0 to 6.11.0 (#317)
dependabot[bot] Jan 14, 2025
28d197c
Feat/store access token in cookie (#310)
timber-they Jan 20, 2025
3de90a0
feat: add generating docs to entrypoint (#301)
jona159 Jan 21, 2025
5b077f9
Feat/deployment (#305)
timber-they Jan 21, 2025
4f08ac7
use default nginx image and mount configuration (#300)
mpfeil Jan 21, 2025
8974b58
Feat/qr enhancement (#318)
YouQam Jan 22, 2025
10aa674
Chore(deps): bump docker/build-push-action from 6.11.0 to 6.12.0 (#322)
dependabot[bot] Jan 27, 2025
e43ba18
Fix/netlify previews stopped working (#327)
timber-they Jan 28, 2025
75305a7
Fix/user new email typo (#331)
jona159 Jan 29, 2025
d4bfa56
Feat/improve err msg add staff (#326)
jona159 Jan 29, 2025
669f522
Fix/svg issuer images in pdf (#330)
jona159 Jan 29, 2025
2d3e53f
Chore(deps): bump docker/build-push-action from 6.12.0 to 6.13.0 (#325)
dependabot[bot] Jan 30, 2025
f17699d
Fix/catch issuer without logo pdf (#334)
jona159 Feb 2, 2025
2ee5a1a
feat: add badgeclass slug to badgeinstance request for better queryin…
jona159 Feb 3, 2025
2b17cac
Fix/dont throw for nonexisting user (#332)
jona159 Feb 5, 2025
200394e
fix: force refresh data as a temporary workaround (#314)
YouQam Feb 6, 2025
7baaa6e
feat: show esco info at bottom of pdf certificate (#340)
YouQam Feb 7, 2025
678c377
fix: mime types (#344)
jona159 Feb 7, 2025
4650bf7
Feat/increase uwsgi/ nginx timeout settings (#337)
jona159 Feb 7, 2025
58cc743
fix: only remove token if present (#348)
timber-they Feb 12, 2025
f6a84a0
Feat/learningpath automation (#320)
strautvetter Feb 12, 2025
20aad6e
fix(auth): fix oauth tokens for older clients (#349)
strautvetter Feb 12, 2025
4a7cb8f
feat: switch off badge request emails (#356)
jona159 Feb 20, 2025
f7f37cf
feat: migrate existing lp participation badges to new lp category (#353)
jona159 Feb 21, 2025
f39c564
fix(oauth): allow insecure login cookie in develop context (#352)
strautvetter Feb 25, 2025
e48d53d
Feat/ai skills keywords endpoint (#358)
strautvetter Feb 27, 2025
3729f94
Feat/altcha perf and spam protection (#361)
jona159 Feb 28, 2025
3875fd1
feat: micro degree pdf (#354)
jona159 Mar 3, 2025
f61556a
fix: use exact font name (#368)
jona159 Mar 11, 2025
1ffdda7
fix: double default buffer size (#370)
jona159 Mar 12, 2025
72c7fb9
fix: exclude revoked lp instances from serializer representation (#372)
jona159 Mar 13, 2025
8d9907a
Feat/api documentation (#364)
timber-they Mar 18, 2025
bc67e48
fix(import): fix unverified created issuer not being able to create b…
strautvetter Mar 19, 2025
8820e40
Feat/micro degree earner email (#355)
jona159 Mar 21, 2025
6e99872
feat: run actions also on PRs to develop (#375)
timber-they Mar 21, 2025
452fea2
feat: document branches (#377)
timber-they Mar 21, 2025
8022f02
Fix/remove old blocks in email (#379)
jona159 Mar 24, 2025
b2668a1
fix: dont underline whitespace (#380)
jona159 Mar 25, 2025
b94a9da
feat: add copy_permissions field to badgeclass (#366)
strautvetter Mar 27, 2025
91e86c6
feat: add migration for hour and minutes fields on competency extensi…
jona159 Apr 3, 2025
73dbbe0
Chore(deps): bump docker/login-action from 3.3.0 to 3.4.0 (#376)
dependabot[bot] Apr 3, 2025
68908d0
Update README to include some findings during initial setup (#385)
scheidtdav Apr 4, 2025
ed5aff0
Feat/new issuer staff flow (#383)
jona159 Apr 4, 2025
7a4c8d0
feat: include slug in json response for badge assertions (#389)
scheidtdav Apr 4, 2025
d2861cc
fix: split up copy and issuer staff request migration (#390)
jona159 Apr 4, 2025
b6f0cfb
fix: merge conflicts (#391)
jona159 Apr 7, 2025
6854199
Fix/issuer staff flow (#394)
jona159 Apr 10, 2025
95bee8e
Fix/issuer staff flow (#394) (#398)
scheidtdav Apr 10, 2025
d8c0fa9
fix: send back status ok if request had already been revoked (#400)
jona159 Apr 11, 2025
51d559e
feat: add badge request email and cronjob (#392)
scheidtdav Apr 11, 2025
f00f989
fix: send staff request email to owner only (#403)
jona159 Apr 11, 2025
2eee043
#396 feat: add a mixin to hide certain fields via the context (#399)
scheidtdav Apr 14, 2025
faa6b91
Fix/competency time email display old badges (#402)
jona159 Apr 14, 2025
36fd5cf
feat: add copy permissions to badge json (#401)
jona159 Apr 14, 2025
ea30a27
Feat/release cherry picks (#404)
jona159 Apr 14, 2025
a2dd91c
fix: comment out code that was falsly cherrypicked (#405)
jona159 Apr 15, 2025
826756c
feat(badgeinstance): add field to save json to db and only generate o…
strautvetter Apr 22, 2025
b387523
feat: merge branch main into develop
jona159 Apr 22, 2025
7f70f96
Deploy to staging (#409)
jona159 Apr 22, 2025
3b061cc
Feat/uv package manager (#382)
strautvetter Apr 22, 2025
bfc32d8
fix: only update if it badgeinstance already exists (#410)
jona159 Apr 24, 2025
012d76b
Merge branch 'main' into fix/squash-conflicts
jona159 Apr 24, 2025
5660923
fix: whitespace in email template (#417)
jona159 Apr 25, 2025
11d482b
feat(admin): add info columns to backend models and view (#407)
strautvetter Apr 30, 2025
656a2d8
Chore(deps): bump docker/build-push-action from 6.13.0 to 6.16.0 (#419)
dependabot[bot] Apr 30, 2025
d9831cc
fix: link directly to staff page (#421)
jona159 May 1, 2025
829819b
Feat/badge import (#406)
jona159 May 12, 2025
685664e
Feat/new badge criteria (#416)
jona159 May 12, 2025
49ab081
fix: add criteria migration (#425)
jona159 May 13, 2025
7f87d6c
feat: add criteria to pdf (#420)
jona159 May 13, 2025
2fe76f0
fix(criteria): correctly handle missing category extension (#426)
strautvetter May 13, 2025
e91e165
fix: create logfile for qrcode badgerequests in dockerfile (#432)
jona159 May 20, 2025
b0d0156
Chore(deps): bump docker/build-push-action from 6.16.0 to 6.17.0 (#433)
dependabot[bot] May 20, 2025
51670c6
fix(pdfs): allow non square issuer images to be placed correctly (#434)
scheidtdav May 23, 2025
00391e2
feat/collection pdf (#436)
jona159 May 23, 2025
b48ca42
Feat/async polling batch assertions (#423)
jona159 May 28, 2025
d7c944f
fix(pdfs): use origin instead of hardcoded openbadges.education (#437)
scheidtdav May 30, 2025
697b3b4
feat: increase memcached memory (#438)
jona159 May 30, 2025
2ea52c6
fix: allow null for criteria ,dont put json in criteria_text (#442)
jona159 Jun 3, 2025
9b6dca6
feat: update deployment.md (#445)
jona159 Jun 6, 2025
57e161d
Chore(deps): bump docker/build-push-action from 6.17.0 to 6.18.0 (#441)
dependabot[bot] Jun 6, 2025
f388be5
fix: restart redis when container exits (#446)
jona159 Jun 11, 2025
5db1841
feat: redirect private collections to badgrapp (#449)
scheidtdav Jun 11, 2025
2e8e8a0
Feat/openbadges 30 (#431)
strautvetter Jun 12, 2025
9aa368d
fix: geocode on issuer creation (#448)
jona159 Jun 12, 2025
08d0b23
feat: verify issuer automatically when new email matches" (#447)
jona159 Jun 12, 2025
3bbffc6
fix: add pulled in packages to dockerfiles (#451)
jona159 Jun 13, 2025
05e5d33
feat: add mysql config, adjust docker compose and init command (#444)
jona159 Jun 16, 2025
4d8264e
feat(aiskills): set endpoints to only acccept post requests (#452)
strautvetter Jun 16, 2025
5738d66
Fix/verify institutions email trigger (#453)
jona159 Jun 17, 2025
bd39b5a
fix: make sure csrf cookie is set when requesting auth token
strautvetter Jun 17, 2025
0a0bbf8
Merge branch 'develop' into fix/set-csrf-cookie-on-login
jona159 Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .docker/Dockerfile.debug.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.8.14-slim-buster

RUN mkdir /badgr_server
WORKDIR /badgr_server

RUN apt-get clean all && apt-get update && apt-get upgrade -y
RUN apt-get install -y default-libmysqlclient-dev \
python3-dev \
python3-cairo \
build-essential \
xmlsec1 \
libxmlsec1-dev \
pkg-config \
curl

RUN pip install uwsgi

COPY requirements.txt /badgr_server

RUN pip --timeout=1000 install --no-dependencies -r requirements.txt
RUN pip --timeout=1000 install debugpy
49 changes: 40 additions & 9 deletions .docker/Dockerfile.dev.api
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
FROM python:3.8-slim
FROM python:3.8.14-slim-buster

RUN mkdir /badgr_server
WORKDIR /badgr_server

RUN apt-get update && apt-get upgrade -y
RUN apt-get clean all && apt-get update && apt-get upgrade -y
RUN apt-get install -y default-libmysqlclient-dev \
python3-dev \
python3-cairo \
build-essential \
xmlsec1 \
libxmlsec1-dev \
pkg-config
python3-dev \
python3-cairo \
build-essential \
xmlsec1 \
libxmlsec1-dev \
pkg-config \
default-mysql-client \
git \
curl

RUN pip install uwsgi

COPY requirements.txt /badgr_server
RUN pip install -r requirements.txt

COPY entrypoint.dev.sh /badgr_server

COPY crontab /etc/cron.d/crontab

COPY openbadges /badgr_server

COPY openbadges_bakery /badgr_server

RUN chmod +x entrypoint.dev.sh

RUN touch /var/log/cron_cleartokens.log && chmod 644 /var/log/cron_cleartokens.log
RUN touch /var/log/cron_qr_badgerequests.log && chmod 644 /var/log/cron_qr_badgerequests.log

ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.30/supercronic-linux-amd64 \
SUPERCRONIC=supercronic-linux-amd64 \
SUPERCRONIC_SHA1SUM=9f27ad28c5c57cd133325b2a66bba69ba2235799

RUN curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic


RUN pip --timeout=1000 install --no-dependencies -r requirements.txt
RUN pip --timeout=1000 install debugpy

ENTRYPOINT ["/badgr_server/entrypoint.dev.sh"]
9 changes: 0 additions & 9 deletions .docker/Dockerfile.nginx

This file was deleted.

84 changes: 66 additions & 18 deletions .docker/Dockerfile.prod.api
Original file line number Diff line number Diff line change
@@ -1,23 +1,71 @@
FROM python:3.8-slim
# Best practies taken from here: https://snyk.io/blog/best-practices-containerizing-python-docker/

# ------------------------------> Build image
FROM python:3.8.14-slim-buster as build
RUN apt-get clean all && apt-get update
RUN apt-get install -y default-libmysqlclient-dev \
python3-dev \
python3-cairo \
build-essential \
xmlsec1 \
libxmlsec1-dev \
pkg-config \
cron

RUN mkdir /badgr_server
WORKDIR /badgr_server
RUN python -m venv /badgr_server/venv
ENV PATH="/badgr_server/venv/bin:$PATH"

RUN apt-get update && apt-get upgrade -y
COPY requirements.txt .
RUN pip install --no-dependencies -r requirements.txt

# ------------------------------> Final image
FROM python:3.8.14-slim-buster
RUN apt-get update
RUN apt-get install -y default-libmysqlclient-dev \
python3-dev \
python3-cairo \
build-essential \
xmlsec1 \
libxmlsec1-dev \
pkg-config

COPY requirements.txt /badgr_server
COPY manage.py /badgr_server
COPY .docker/etc/uwsgi.ini /badgr_server
COPY .docker/etc/wsgi.py /badgr_server
COPY apps /badgr_server/apps
COPY .docker/etc/settings_local.py /badgr_server/apps/mainsite/

RUN pip install uwsgi
RUN pip install -r requirements.txt
python3-cairo \
git \
libxml2 \
default-mysql-client \
cron \
curl

RUN groupadd -g 999 python && \
useradd -r -u 999 -g python python

RUN mkdir /badgr_server && chown python:python /badgr_server
RUN mkdir /backups && chown python:python /backups

WORKDIR /badgr_server

# Copy installed dependencies
COPY --chown=python:python --from=build /badgr_server/venv /badgr_server/venv

# Copy everything related Django stuff
COPY --chown=python:python manage.py .
COPY --chown=python:python .docker/etc/uwsgi.ini .
COPY --chown=python:python .docker/etc/wsgi.py .
COPY --chown=python:python apps ./apps
COPY --chown=python:python openbadges ./openbadges
COPY --chown=python:python openbadges_bakery ./openbadges_bakery
COPY --chown=python:python .docker/etc/settings_local.py ./apps/mainsite/
COPY --chown=python:python entrypoint.sh .

RUN chmod +x entrypoint.sh

# Latest releases available at https://github.com/aptible/supercronic/releases
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.30/supercronic-linux-amd64 \
SUPERCRONIC=supercronic-linux-amd64 \
SUPERCRONIC_SHA1SUM=9f27ad28c5c57cd133325b2a66bba69ba2235799

RUN curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic

USER 999

ENV PATH="/badgr_server/venv/bin:$PATH"
ENTRYPOINT ["./entrypoint.sh"]
5 changes: 5 additions & 0 deletions .docker/etc/nginx.conf → .docker/config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ http {
sendfile on;

keepalive_timeout 65;
client_max_body_size 10M;

proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;

gzip on;
gzip_types text/plain application/xml;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {

location /media {
alias /mediafiles;
add_header Access-Control-Allow-Origin "https://mybadges.org";
add_header Access-Control-Allow-Origin "https://openbadges.education";
}

location /static {
Expand Down
2 changes: 1 addition & 1 deletion .docker/etc/init.sql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE DATABASE IF NOT EXISTS badgr;
CREATE DATABASE IF NOT EXISTS badgr SET utf8mb4 COLLATE utf8mb4_general_ci;
33 changes: 30 additions & 3 deletions .docker/etc/settings_local.dev.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ DATABASES = {
'HOST': 'db',
'PORT': '',
'OPTIONS': {
# "SET character_set_connection=utf8mb3, collation_connection=utf8_unicode_ci", # Uncomment when using MySQL to ensure consistency across servers
'charset': 'utf8mb4',
'init_command': "SET NAMES 'utf8mb4' COLLATE 'utf8mb4_general_ci'"
},
}
}
Expand All @@ -41,7 +42,7 @@ DATABASES = {
###
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': 'memcached:11211',
'KEY_FUNCTION': 'mainsite.utils.filter_cache_key'
}
Expand All @@ -57,6 +58,10 @@ CACHES = {
DEFAULT_FROM_EMAIL = '' # e.g. "noreply@example.com"
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

# use these settings if you want to use mailhog instead of console backend
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# EMAIL_HOST = 'mailhog'
# EMAIL_PORT = 1025

###
#
Expand Down Expand Up @@ -148,4 +153,26 @@ LOGGING = {
}

NOUNPROJECT_API_KEY = ''
NOUNPROJECT_SECRET = ''
NOUNPROJECT_SECRET = ''

AISKILLS_API_KEY = ''
AISKILLS_ENDPOINT_CHATS = ''
AISKILLS_ENDPOINT_KEYWORDS = ''

OIDC_RP_CLIENT_ID = ''
OIDC_RP_CLIENT_SECRET = ''
OIDC_OP_AUTHORIZATION_ENDPOINT = ''
OIDC_OP_TOKEN_ENDPOINT = ''
OIDC_OP_USER_ENDPOINT = ''
OIDC_OP_JWKS_ENDPOINT = ''
OIDC_OP_END_SESSION_ENDPOINT = ''
LOGIN_BASE_URL = ''

# Don't change these
LOGIN_REDIRECT_URL = f'{LOGIN_BASE_URL}?validateToken'
LOGOUT_REDIRECT_URL = f'{LOGIN_BASE_URL}'

ALTCHA_API_KEY = ''
ALTCHA_SECRET = ''

ALTCHA_SPAMFILTER_ENDPOINT = 'https://eu.altcha.org/api/v1/classify?'
28 changes: 25 additions & 3 deletions .docker/etc/settings_local.prod.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ DATABASES = {
'HOST': 'db',
'PORT': '',
'OPTIONS': {
# "SET character_set_connection=utf8mb3, collation_connection=utf8_unicode_ci", # Uncomment when using MySQL to ensure consistency across servers
'charset': 'utf8mb4',
'init_command': "SET NAMES 'utf8mb4' COLLATE 'utf8mb4_general_ci'"
},
}
}
Expand All @@ -41,7 +42,7 @@ DATABASES = {
###
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': 'memcached:11211',
'KEY_FUNCTION': 'mainsite.utils.filter_cache_key'
}
Expand Down Expand Up @@ -143,4 +144,25 @@ LOGGING = {
}

NOUNPROJECT_API_KEY = ''
NOUNPROJECT_SECRET = ''
NOUNPROJECT_SECRET = ''

AISKILLS_API_KEY = ''
AISKILLS_ENDPOINT_CHATS = ''
AISKILLS_ENDPOINT_KEYWORDS = ''

OIDC_RP_CLIENT_ID = ''
OIDC_RP_CLIENT_SECRET = ''
OIDC_OP_AUTHORIZATION_ENDPOINT = ''
OIDC_OP_TOKEN_ENDPOINT = ''
OIDC_OP_USER_ENDPOINT = ''
OIDC_OP_JWKS_ENDPOINT = ''
OIDC_OP_END_SESSION_ENDPOINT = ''
LOGIN_BASE_URL = ''

# Don't change these
LOGIN_REDIRECT_URL = f'{LOGIN_BASE_URL}?validateToken'
LOGOUT_REDIRECT_URL = f'{LOGIN_BASE_URL}'

ALTCHA_API_KEY = ''
ALTCHA_SECRET = ''
ALTCHA_SPAMFILTER_ENDPOINT = "https://eu.altcha.org/api/v1/classify?"
9 changes: 9 additions & 0 deletions .docker/etc/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ threads=2
chdir=/badgr_server
module=wsgi:application
vacuum=true
gid=999
uid=999

harakiri = 300 # 5 minutes
http-timeout = 300
socket-timeout = 300

buffer-size = 8192
header-buffer-size = 8192
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
Loading