- check out a working copy
- create and activate a python3 virtualenv
virtualenv --python=python 3 . . bin/activate pip install -r requirements.txt
- set up a database and a user that has all privileges with it.
- create ietf_guides/settings/local.py and add values for
SECRET_KEY(this is the usual django SECRET_KEY)HASHSALT(some short string - see guides/utils.py for how this is used)DEFAULT_FROM_EMAILDATABASES(a dict matching the database you set up above)
Some possible DATABASE dicts:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
DATABASES = {
'default': {
'NAME': 'ietf_guides',
'ENGINE': 'django.db.backends.mysql',
'USER': <your db user>,
'PASSWORD': <your db password>,
'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"},
},
}- export which settings you want to use as
DJANGO_SETTINGS_MODULE(e.g.ietf_guides.settings.dev) or supply settings on the command line as necessary ./manage.py migrate./manage.py test --settings=ietf_guides.settings.test./manage.py createsuperuser
- set up a database and a user that has all privileges with it
- create a run directory outside any clone of the source
- create a
local.pyin that directory as above - start the most recent image from https://cloud.docker.com/u/ietf/repository/docker/ietf/ietf_guides mapping your
local.pyand possibly your database socket into the container using a command similar to:
docker run -it -v ${PWD}/logs:/code/logs -v ${PWD}/local.py:/code/ietf_guides/settings/local.py -p 8002:80 --name ietf-guides ghcr.io/ietf-tools/ietf-guides:latestor perhaps
docker run -it -v ${PWD}/logs:/code/logs -v ${PWD}/secrets/local.py:/code/ietf_guides/settings/local.py -v /var/run/mysql:/var/run/mysql -p 8002:80 --name ietf-guides ghcr.io/ietf-tools/ietf-guides:latestThe website will then be exposed at http://localhost:8002
running ./manage.py make_dummy_data will create ten guides and ten participants with field values populated by Faker.