First, clone this repository.
This project uses Docker to build and run the code, both frontend and backend. So the only requirement to run it locally is a recent version of Docker with docker-compose.
Obtain a recent database dump with name like ietfa.*.gz
and place in docker/database/
directory. Otherwise, it will start with a fresh database.
Obtain and unarchive media files into media/
folder.
Run docker compose up
. It will build and start the frontend builder (yarn run start
) and the backend (python manage.py runserver
analog), along with a Postgresql database. The first run will take a while because the database dump needs to be restored.
After the frontend compilation finishes, the website should become available at http://localhost:8001
Create a super user on Python application docker instance to access http://localhost:8001/admin
docker exec -ti www-application-1 python manage.py createsuperuser
To destroy everything (i.e. start the database from scratch) run docker compose down
.
Run docker compose up
. It will build and start the frontend builder (yarn run start
) and the backend (python manage.py runserver
analog), along with a Postgresql database. The first run will take a while because the database dump needs to be restored.
Create an admin user
docker exec -ti www-application-1 python manage.py createsuperuser
Log into http://localhost:8001/admin
Create a new "Home Page" (page type must be Home Page
) and publish.
Go to http://localhost:8001/admin/sites/ and select localhost.
Select the new "Home Page" as the root page and save.
The website should become available at http://localhost:8001
To destroy everything (i.e. start the database from scratch) run docker compose down
.
The backend configuration resides in ietf/settings/docker
, inheriting some settings from base.py
. Configuration is done with environment variables with sane checks, i.e. if a variable is required but not set, the application won't start.
To send analytics data to Matomo set the following configuration options in the local settings file.
MATOMO_DOMAIN_PATH = "analytics.ietf.org"
MATOMO_SITE_ID = "<site id>"
Note: Running these steps before the Docker instructions above may prevent the frontend docker instance to run properly.
Install NVM and Yarn and then run these commands from the repo directory,
First, install dependencies:
# Make sure you use the right node version.
nvm install
nvm use
# Install project dependencies
yarn install
Then, build the frontend static files using one of these commands
# Builds and watches the frontend assets (use this when developing).
yarn run start
# Builds frontend development (non-optimized) assets, without watching
yarn run build
# Builds frontend production assets.
yarn run dist
Other available commands can be viewed with
yarn run
This repo contains code for both the IETF and IAB websites, which are intended to run as separate sites. If you don't have a DB dump, or your dump does not have the IAB site set up, these are the steps you need to have a paralell site running:
/admin/pages
)http://localhost:8001/admin/sites/
)Dependencies are managed using pip-tools. They are specified in requirements/*.in
and version-pinned in requirements/*.txt
. To update the pins, run:
docker compose run --rm application requirements/compile -U
Dev (automatically build from main branch): https://ws-main.dev.ietf.org/
If the main
branch is selected, changes will be deployed to https://ws-main.dev.ietf.org/
Changes will be available on a subdomain compiled from the branch name if any other branch is selected. If a /
is present in the branch name, the first part will be stripped off and any other /
are replaced with -
. For example, deployment from the feat/foobar
branch will be available on https://ws-foobar.dev.ietf.org
, branch fix/foo-bar
will be available on https://ws-foo-bar.dev.ietf.org
and branch fix/foo/bar
will be available on https://ws-foo-bar.dev.ietf.org
.