- Install Docker
- Install Docker Compose
-
Get the docker installation repository and the source code:
git clone [email protected]:eftafmo/dataviz.git cd dataviz
-
Prepare environment:
cp docker/docker-compose.override-dev.yml.example docker-compose.override.yml cp docker/web.dev.env.example docker/web.env
-
Create local settings:
cp dv/localsettings.py.example dv/localsettings.py
-
Start services:
docker-compose up -d
-
Replace database file with the latest version from production
scp [email protected]:eeag.sqlite3 /tmp/eeag.sqlite3 docker cp /tmp/eeag.sqlite3 eeag_web:/var/local/db/eeag.sqlite3
-
Step in the container, install requirements, and rebuild indexes.
docker-compose exec web bash pip install -r requirements/dev.txt -c requirements/constraints.txt python manage.py rebuild_index --noinput
-
Install npm and start webpack dev server(leave this container open):
npm install npm run dev
-
Open another web container and start the django server:
docker-compose exec web bash python manage.py runserver 0.0.0.0:8000
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements/dev.txt -c requirements/constraints.txt
nvm use 20
npm install
# Copy settings and adjust as necessary
cp dv/localsettings.py.example dv/localsettings.py
# Copy data file from prod/test
mkdir -p ../db
scp [email protected]:eeag.sqlite3 ../db
# See es_local.md if you also need Elasticsearch and
# build search indexes
python manage.py rebuild_index --noinput
# start Django and frontend server
python manage.py runserver 0:8000
# in a new terminal
npm run dev