-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Patrick Upson edited this page Aug 21, 2025
·
4 revisions
This guide will help you set up the DTO Viewer for local development or production data access.
Before you begin, ensure you have:
- Docker Desktop installed and running
- PyCharm Professional (for Docker Compose integration)
- Git
- Access to environment variables (contact team lead for production values)
-
Clone the repository:
git clone https://github.com/dfo-mar-odis/dto.git cd dto -
Choose your setup:
- Local Development: Full local environment with database
- Production Data Access: Connect to production database (for data loading only)
The project includes three Docker Compose configurations:
| File | Purpose | When to Use |
|---|---|---|
docker-compose.yml |
Production webserver | Loading data to production DB |
docker-compose-local.yml |
Local development | Testing and development |
docker-compose-remote.yml |
Local development using remote database | Used for Loading and testing the remote database |
docker-compose.yml - it's for production use only.
Create a .env file in the project root with these variables:
# Django Settings
SECRET_KEY=your-secret-key-here
DJANGO_LOG_FILE=error.log
DJANGO_LOG_LEVEL=DEBUG
DJANGO_SETTINGS_MODULE=config.django.local # or config.django.production
# Database Settings
PGUSER=postgres
PGPASSWORD=postgres
PGDATABASE=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
# PostGIS Settings
POSTGIS_ADDR=dto-postgis # for local, or production address
POSTGIS_PORT=5432💡 Tip: For local development, you can use the default PostgreSQL values shown above.
See Run Configuration Guide for instructions on:
- Setting up species thermal data
- Environment Variable Strings
- Creating a Pycharm Run/Debug Configuration
See Data Loading Guide for instructions on:
- Importing MPA polygons
- Loading GLORYS12V1 temperature data
- Setting up species thermal data
- Loading Observation data
Docker containers won't start:
- Ensure Docker Desktop is running
- Check environment variables are set correctly
- Review logs:
docker-compose logs
Database connection errors:
- Verify POSTGIS_ADDR matches your setup
- Check database credentials
- Ensure database container is running (for local setup)
PyCharm can't find interpreter:
- Rebuild containers:
docker-compose down && docker-compose up --build - Invalidate PyCharm caches: File → Invalidate Caches
- Check existing issues
- Contact the development team
- Review troubleshooting guide