Feel free to use the provided [VS] Code workspace file to ensure formatting and all the other niceties work. Make sure you have all the required extensions installed ([VS] Code) should let you know.
You can run [VS] Code from the command line with the workspace file loaded with code parlameter.code-workspace.
docker-compose upRunning docker compose will:
- start
postgresql,memcached, andsolr - start
parladataon port8000(backend) - start
parlassetson port8080(static files) - start
parlasiteon port3066(frontend) - start a
parlacardsserver on port3000
You should now be able to access the Parlameter website on http://localhost:3066 and the admin interface at http://localhost:8000/admin.
Note
This will start the parlacards "production" server inside docker. The cards will build and then be statically served on every restart. Because of some underlying issues with how the dev mode differs from production, you will need to run parlacards separately if you want to work on a single card!
If something doesn't load you may need to change evironment variables in docker-compose.yaml with correct urls.
You should set up Parladata minimally. Run:
docker-compose exec parladata python manage.py migrateto make sure the database schema is up to date,docker-compose exec parladata python manage.py createsuperuserto make yourself a superuser,- import a database. For now, please check parladata/README.md for more instructions on this step, but a "simplest version" should appear here shortly after this TODO is resolved.
First open a separate terminal and go to the parlacards folder:
cd parlacardsThere are two options for running parlacards depending on what you want to do:
# start a development server (with hot reload and good dev experience, but doesnt work within parlasite)
yarn dev# build the cards
VITE_PARLASSETS_URL=http://localhost:8080 \
yarn build
# serve the built cards
VITE_PARLASSETS_URL=http://localhost:8080 \
VITE_PARLACARDS_URL=http://localhost:3000 \
VITE_PARLASITE_URL=http://localhost:3066 \
VITE_PARLADATA_URL=http://localhost:8000/v3 \
yarn startNote
Make sure parlacards/dist/client folder exists before running docker compose to prevent permission issues!
For parladata see parladata/README.md
For parlacards see parlacards/README.md
For parlasite see parlasite/README.md
For parlassets see parlassets/README.md
Integration with our weblate instance for translations is enabled on this repo.
The base language for translations is en.
The following components are added:
- parlasite -
defaults.json,sitemap.json - parlacards -
defaults.yaml - parlacards - card specific
.yamlfiles are automatically picked up when pushed to thedevbranch
When adding new translation keys/files only add them for en. Weblate will create a PR when translations for other languages are created.