A unified API and event database that collects, normalizes, and serves solar event data from multiple sources (HEK, CCMC, WSA, RHESSI) for use in Helioviewer.org and related tools.
This project uses Docker Compose for local development with PHP 8.4, Nginx, and PostgreSQL.
- Docker
- Docker Compose
- Make (optional, for convenience commands)
-
Start the development environment:
make up
Or manually:
docker compose -f docker/docker-compose.yml up
-
Install PHP dependencies:
make composer-install
-
Run database migrations:
make migrate-run
-
Seed the database with sample data:
make seed-run
-
Access the application:
- Open http://localhost:8082 in your browser
- You should see the PHP info page
For a complete list of available commands, run:
make
make up
- Start the Docker containersmake down
- Stop the Docker containersmake build
- Build the Docker imagesmake shell
- Open a bash shell in the PHP container
make composer-install
- Install PHP dependencies via Composermake composer-require PACKAGE=package-name
- Add a new package
make migrate-status
- Check migration statusmake migrate-create NAME=MigrationName
- Create a new migrationmake migrate-run
- Run pending migrationsmake migrate-rollback
- Rollback the last migrationmake seed-run
- Run database seeders
- Nginx (
eventsapi-nginx
) - Web server listening on port 8082 - PHP-FPM (
eventsapi-phpfpm
) - PHP 8.4 with Composer and PostgreSQL support - PostgreSQL (
eventsapi-postgres
) - Database server (internal network only) - Network - All services communicate via
eventsapi
network - Document Root -
/u/apps/site/public
(maps to./public/
)
The PostgreSQL database is configured with:
- Database:
eventsapi
- User:
eventsapi
- Password:
eventsapi_pass
- Host:
postgres
(container name) - Port:
5432
Database migrations are managed using Phinx and configured to read connection details from environment variables.