Heliotime (heliotime.org)
Interactive web viewer of GOES X-ray Flux data from 1980 to now. Lets you inspect specific solar flares, the different solar cycles, or any other time range of your choosing. Includes a preview of Helioviewer when selecting a timestamp. See heliotime.org or the screenshots.
First, this repository uses Git submodules, so ensure they are properly initialized:
git submodule init
git submodule update
Run the following command to deploy the development Docker Compose configuration:
./du.sh dev deploy
This will run everything in Docker and make the site available at:
For development it is easier to run the individual services on the host. Check out the readmes (Server, Site) in the respective subdirectories.
For the database, here are some useful commands:
# Start only the database
./du.sh dev deploy db
# Reset the database (wipes all data)
./du.sh dev db:reset
Docker Utility
du.sh
is an alias todocker compose
which loads the right compose files depending on the selected environment: developmentdev
or productionprod
. Only production requires certain environment variables to be set. See Configuration for available options.
See deployment on how to deploy Heliotime in production.
The Docker Compose deployment, site, and server can be configured using the following environment variables:
Name |
Dev Default | Prod Default | Description |
---|---|---|---|
API_PORT |
8000 |
same | Port the api (server) will be exposed at. |
SITE_PORT |
3000 |
same | Port the site will be exposed at. |
EXTERNAL_DATABASE_PORT |
5432 |
same | Port the database will be exposed at. |
DATABASE_HOST |
db / localhost |
same | Hostname of the database. (Docker / Host) |
DATABASE_PORT |
5432 |
same | Port of the database. (useful for external DBs) |
DATABASE_DATABASE |
postgres |
same | Name of the database to use. |
DATABASE_USERNAME |
postgres |
same | Username to authenticate with the database. |
DATABASE_PASSWORD |
heliotime |
- | Password to authenticate with the database. |
DATABASE_POOL_SIZE |
10 |
same | Amount of database connections a single worker has available. |
DATABASE_MEMORY_GB |
28 |
same | GB of memory available to the database. Used by migrations to optimize chunk and cache sizes. |
IMPORT_START |
now - 30 days | same | From when to import data in ISO format. |
FLUX_MAX_RESOLUTION |
2000 |
same | Max flux resolution allowed to be requested. Bigger request will be downsized. |
FLUX_QUERY_TIMEOUT |
30 |
same | Timeout of flux database queries before giving up. |
WEB_CONCURRENCY |
1 |
same | Worker count handling API requests. Optional around 2 x CPU . |
NEXT_PUBLIC_API_URL |
http://localhost:8000 |
same | URL used by the browser to access the API. |
Docker Compose automatically loads .env
in the repository root and the site (Next.js) does the same for site/.env.local
when running on the host.