Skip to content

Commit

Permalink
Basic vite setup, needs CORS or Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Nov 25, 2023
1 parent ae4394d commit 4de7fd1
Show file tree
Hide file tree
Showing 49 changed files with 575 additions and 3,340 deletions.
89 changes: 44 additions & 45 deletions .env
Original file line number Diff line number Diff line change
@@ -1,67 +1,66 @@
DC_BASE=https://api.dev.documentcloud.org
APP_URL=https://www.dev.documentcloud.org/
EMBED_URL=https://www.dev.documentcloud.org/
SQUARELET_BASE=https://dev.squarelet.com
DC_APP_URL=https://www.dev.documentcloud.org/
DC_EMBED_URL=https://www.dev.documentcloud.org/
DC_SQUARELET_BASE=https://dev.squarelet.com

DC_LOGIN=/accounts/login/squarelet
DC_LOGOUT=/accounts/logout/
SQUARELET_SIGNUP=/accounts/signup/?intent=documentcloud&next=
DC_SQUARELET_SIGNUP=/accounts/signup/?intent=documentcloud&next=

POLL_INTERVAL=5000
IMAGE_WIDTHS=xlarge:2000,large:1000,normal:700,small:180,thumbnail:60
DC_POLL_INTERVAL=5000
DC_IMAGE_WIDTHS=xlarge:2000,large:1000,normal:700,small:180,thumbnail:60

MAX_PER_PAGE=100
DC_MAX_PER_PAGE=100

PDF_SIZE_LIMIT=525336576
PDF_SIZE_LIMIT_READABLE=500 MB
DC_PDF_SIZE_LIMIT=525336576
DC_PDF_SIZE_LIMIT_READABLE=500 MB

DOCUMENT_SIZE_LIMIT=27262976
DOCUMENT_SIZE_LIMIT_READABLE=25 MB
DC_DOCUMENT_SIZE_LIMIT=27262976
DC_DOCUMENT_SIZE_LIMIT_READABLE=25 MB

TOAST_LENGTH=5000
TOAST_FADE=800
DC_TOAST_LENGTH=5000
DC_TOAST_FADE=800

LEGACY_CUT_OFF=20000000
DC_LEGACY_CUT_OFF=20000000

HIGHLIGHT_START=<em>
HIGHLIGHT_END=</em>
DC_HIGHLIGHT_START=<em>
DC_HIGHLIGHT_END=</em>

API=/api/
DC_API=/api/

UPLOAD_LIMIT=1000
UPLOAD_BATCH=25
UPLOAD_BATCH_DELAY=1000
GET_BATCH=25
GET_BATCH_DELAY=1000
DC_UPLOAD_LIMIT=1000
DC_UPLOAD_BATCH=25
DC_UPLOAD_BATCH_DELAY=1000
DC_GET_BATCH=25
DC_GET_BATCH_DELAY=1000

TAG_KEY=_tag
DC_TAG_KEY=_tag

SPECIAL_VERSION=Thanks for using DocumentCloud!
SPECIAL_CONTACT=mailto:[email protected]?subject=DocumentCloud Feedback
TIP_OF_THE_DAY=tipofday/
LOGIN_ERROR=DocumentCloud is only available to users we have explicitly granted permission.
DC_SPECIAL_VERSION=Thanks for using DocumentCloud!
DC_SPECIAL_CONTACT=mailto:[email protected]?subject=DocumentCloud Feedback
DC_TIP_OF_THE_DAY=tipofday/
DC_LOGIN_ERROR=DocumentCloud is only available to users we have explicitly granted permission.

LANGUAGE_CODES=afr|amh|ara|asm|aze|aze_cyrl|bel|ben|bod|bos|bul|cat|ceb|ces|zho|tra|chr|cym|dan|deu|dzo|ell|eng|enm|epo|est|eus|fas|fin|fra|frk|frm|gle|glg|grc|guj|hat|heb|hin|hrv|hun|iku|ind|isl|ita|ita_old|jav|jpn|kan|kat|kat_old|kaz|khm|kir|kor|kur|lao|lat|lav|lit|mal|mar|mkd|mlt|msa|mya|nep|nld|nor|ori|pan|pol|por|pus|ron|rus|san|sin|slk|slv|spa|spa_old|sqi|srp|srp_latn|swa|swe|syr|tam|tel|tgk|tgl|tha|tir|tur|uig|ukr|urd|uzb|uzb_cyrl|vie|yid
LANGUAGE_NAMES=Afrikaans|Amharic|Arabic|Assamese|Azerbaijani|Azerbaijani - Cyrillic|Belarusian|Bengali|Tibetan|Bosnian|Bulgarian|Catalan|Cebuano|Czech|Chinese - Simplified|Chinese - Traditional|Cherokee|Welsh|Danish|German|Dzongkha|Greek|English|Middle English|Esperanto|Estonian|Basque|Persian|Finnish|French|German Fraktur|Middle French|Irish|Galician|Ancient Greek|Gujarati|Haitian; Haitian Creole|Hebrew|Hindi|Croatian|Hungarian|Inuktitut|Indonesian|Icelandic|Italian|Italian - Old|Javanese|Japanese|Kannada|Georgian|Georgian - Old|Kazakh|Central Khmer|Kirghiz; Kyrgyz|Korean|Kurdish|Lao|Latin|Latvian|Lithuanian|Malayalam|Marathi|Macedonian|Maltese|Malay|Burmese|Nepali|Dutch; Flemish|Norwegian|Oriya|Panjabi; Punjabi|Polish|Portuguese|Pushto; Pashto|Romanian; Moldavian; Moldovan|Russian|Sanskrit|Sinhala; Sinhalese|Slovak|Slovenian|Spanish; Castilian|Spanish; Castilian - Old|Albanian|Serbian|Serbian - Latin|Swahili|Swedish|Syriac|Tamil|Telugu|Tajik|Tagalog|Thai|Tigrinya|Turkish|Uighur; Uyghur|Ukrainian|Urdu|Uzbek|Uzbek - Cyrillic|Vietnamese|Yiddish
DEFAULT_LANGUAGE=eng
DC_LANGUAGE_CODES=afr|amh|ara|asm|aze|aze_cyrl|bel|ben|bod|bos|bul|cat|ceb|ces|zho|tra|chr|cym|dan|deu|dzo|ell|eng|enm|epo|est|eus|fas|fin|fra|frk|frm|gle|glg|grc|guj|hat|heb|hin|hrv|hun|iku|ind|isl|ita|ita_old|jav|jpn|kan|kat|kat_old|kaz|khm|kir|kor|kur|lao|lat|lav|lit|mal|mar|mkd|mlt|msa|mya|nep|nld|nor|ori|pan|pol|por|pus|ron|rus|san|sin|slk|slv|spa|spa_old|sqi|srp|srp_latn|swa|swe|syr|tam|tel|tgk|tgl|tha|tir|tur|uig|ukr|urd|uzb|uzb_cyrl|vie|yid
DC_LANGUAGE_NAMES=Afrikaans|Amharic|Arabic|Assamese|Azerbaijani|Azerbaijani - Cyrillic|Belarusian|Bengali|Tibetan|Bosnian|Bulgarian|Catalan|Cebuano|Czech|Chinese - Simplified|Chinese - Traditional|Cherokee|Welsh|Danish|German|Dzongkha|Greek|English|Middle English|Esperanto|Estonian|Basque|Persian|Finnish|French|German Fraktur|Middle French|Irish|Galician|Ancient Greek|Gujarati|Haitian; Haitian Creole|Hebrew|Hindi|Croatian|Hungarian|Inuktitut|Indonesian|Icelandic|Italian|Italian - Old|Javanese|Japanese|Kannada|Georgian|Georgian - Old|Kazakh|Central Khmer|Kirghiz; Kyrgyz|Korean|Kurdish|Lao|Latin|Latvian|Lithuanian|Malayalam|Marathi|Macedonian|Maltese|Malay|Burmese|Nepali|Dutch; Flemish|Norwegian|Oriya|Panjabi; Punjabi|Polish|Portuguese|Pushto; Pashto|Romanian; Moldavian; Moldovan|Russian|Sanskrit|Sinhala; Sinhalese|Slovak|Slovenian|Spanish; Castilian|Spanish; Castilian - Old|Albanian|Serbian|Serbian - Latin|Swahili|Swedish|Syriac|Tamil|Telugu|Tajik|Tagalog|Thai|Tigrinya|Turkish|Uighur; Uyghur|Ukrainian|Urdu|Uzbek|Uzbek - Cyrillic|Vietnamese|Yiddish
DC_DEFAULT_LANGUAGE=eng

DOCUMENT_TYPES=123,602,abw,agd,bmp,cdr,cgm,cmx,csv,cwk,dbf,dif,doc,docx,dot,emf,eps,fb2,fhd,fodg,fodp,fods,fodt,gif,gnm,gnumeric,htm,html,hwp,jpeg,jpg,jtd,jtt,key,kth,mml,numbers,odb,odf,odg,odp,ods,odt,p65,pages,pbm,pcd,pct,pcx,pdf,pgm,plt,pm3,pm4,pm5,pm6,pmd,png,pot,ppm,pps,ppt,pptx,psd,pub,qxp,ras,rlf,rtf,sda,sdc,sdd,sdp,sdw,sgf,sgl,sgv,slk,stc,std,sti,stw,svg,svm,sxc,sxd,sxi,sxm,sxw,tga,tif,tiff,txt,uof,uop,uos,uot,vor,vsd,wb2,wdb,wk1,wk3,wk4,wks,wpd,wps,wq1,wq2,wri,xbm,xls,xlsx,xlt,xlw,xml,xpm,zabw,zmf
DC_DOCUMENT_TYPES=123,602,abw,agd,bmp,cdr,cgm,cmx,csv,cwk,dbf,dif,doc,docx,dot,emf,eps,fb2,fhd,fodg,fodp,fods,fodt,gif,gnm,gnumeric,htm,html,hwp,jpeg,jpg,jtd,jtt,key,kth,mml,numbers,odb,odf,odg,odp,ods,odt,p65,pages,pbm,pcd,pct,pcx,pdf,pgm,plt,pm3,pm4,pm5,pm6,pmd,png,pot,ppm,pps,ppt,pptx,psd,pub,qxp,ras,rlf,rtf,sda,sdc,sdd,sdp,sdw,sgf,sgl,sgv,slk,stc,std,sti,stw,svg,svm,sxc,sxd,sxi,sxm,sxw,tga,tif,tiff,txt,uof,uop,uos,uot,vor,vsd,wb2,wdb,wk1,wk3,wk4,wks,wpd,wps,wq1,wq2,wri,xbm,xls,xlsx,xlt,xlw,xml,xpm,zabw,zmf

STAFF_ONLY_S3_URL=http://minio.documentcloud.org:9000/minio/documents/documents/$$ID$$/
DC_STAFF_ONLY_S3_URL=http://minio.documentcloud.org:9000/minio/documents/documents/$$ID$$/

DC_DOCUMENT_TITLE_CHAR_LIMIT=1000
DC_DOCUMENT_DESCRIPTION_CHAR_LIMIT=4000
DC_DOCUMENT_SOURCE_CHAR_LIMIT=1000
DC_RELATED_ARTICLE_URL_CHAR_LIMIT=1024
DC_PUBLISHED_URL_CHAR_LIMIT=1024

DOCUMENT_TITLE_CHAR_LIMIT=1000
DOCUMENT_DESCRIPTION_CHAR_LIMIT=4000
DOCUMENT_SOURCE_CHAR_LIMIT=1000
RELATED_ARTICLE_URL_CHAR_LIMIT=1024
PUBLISHED_URL_CHAR_LIMIT=1024
DC_PROJECT_DESCRIPTION_CHAR_LIMIT=1000
DC_PROJECT_TITLE_CHAR_LIMIT=255

PROJECT_DESCRIPTION_CHAR_LIMIT=1000
PROJECT_TITLE_CHAR_LIMIT=255
DC_NOTE_TITLE_CHAR_LIMIT=500
DC_NOTE_CONTENT_CHAR_LIMIT=2000
DC_SECTION_TITLE_CHAR_LIMIT=200

NOTE_TITLE_CHAR_LIMIT=500
NOTE_CONTENT_CHAR_LIMIT=2000
SECTION_TITLE_CHAR_LIMIT=200

PROJECT_REDIRECT_HASH_URL=https://s3.amazonaws.com/s3.documentcloud.org/legacy/project_redirects.bin
ORG_REDIRECT_HASH_URL=https://s3.amazonaws.com/s3.documentcloud.org/legacy/org_redirects.bin
DC_PROJECT_REDIRECT_HASH_URL=https://s3.amazonaws.com/s3.documentcloud.org/legacy/project_redirects.bin
DC_ORG_REDIRECT_HASH_URL=https://s3.amazonaws.com/s3.documentcloud.org/legacy/org_redirects.bin
4 changes: 3 additions & 1 deletion src/main.html → index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf8" />
Expand All @@ -8,6 +8,8 @@

<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="stylesheet" href="/fonts.css" />

<script type="module" src="./src/main.js"></script>
</head>

<body></body>
Expand Down
4 changes: 3 additions & 1 deletion local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ services:
- nodemodules:/app/node_modules
- .:/app
working_dir: /app
command: npm run watch
command: npm run dev
networks:
default:
aliases:
- internal.www.dev.documentcloud.org
squarelet_default:
aliases:
- internal.www.dev.documentcloud.org
environment:
DOCKER: true

documentcloud_frontend_app:
image: node:18
Expand Down
Loading

0 comments on commit 4de7fd1

Please sign in to comment.