ProjectAmaterasu is a modular project designed to integrate several components for seamless functionality across different platforms. The project consists of three main components:
- Description: A
docker-compose.ymlsetup for a Postgres database that supports the application.
- Description: This service is the RESTful API layer that provides endpoints for communication between the backend and frontend or external services.
- Key Features:
- CRUD operations for managing resources.
- Authentication and authorization mechanisms.
- JSON-based data exchange.
- Description: The Angular-based user interface, offering a front-facing application for end users.
- Key Features:
- Responsive design for various devices.
- Integration with
amaterasu-restto fetch dynamic content.
To get started with ProjectAmaterasu, follow these steps:
- Download the docker-compose.yml:
wget https://raw.githubusercontent.com/infernokun/ProjectAmaterasu/refs/heads/main/docker-compose.yml-
Set up environment variables:
- You can create
.envfiles in the respective component directories or define environment variables directly in thedocker-compose.ymlfile.
- You can create
-
Run the application:
Ensure you have Docker and Docker Compose installed.
Then, run the following command to start all the services:
docker-compose up -dThis will bring up the following services:
- amaterasu-web: The front-end Angular application.
- amaterasu-db: The PostgreSQL database.
- amaterasu-rest: The RESTful API layer.
Work In Progress
Details on using the application and accessing the services will be added soon.
The docker-compose.yml file is configured to set up all services. Here is a breakdown of the services included in the file:
- Description: The Angular application that serves as the front-end UI for end users.
- Ports:
- Exposes port 80 on the container, mapped to port 8764 on the host.
- Environment Variables:
BASE_URL: The base URL for the web application.REST_URL: The URL to the API layer (for integration).
- Dependencies:
- Depends on
amaterasu-dbbeing healthy before starting.
- Depends on
- Description: A PostgreSQL database to store application data.
- Ports:
- Exposes the default PostgreSQL port
5432.
- Exposes the default PostgreSQL port
- Environment Variables:
POSTGRES_USER: The PostgreSQL user (default:amaterasu).POSTGRES_PASSWORD: The PostgreSQL password (default:amaterasu).POSTGRES_DB: The PostgreSQL database name (default:amaterasu).
- Volumes:
- Persist data using the volume
./amaterasu-db:/var/lib/postgresql/data.
- Persist data using the volume
- Healthcheck:
- The healthcheck ensures that PostgreSQL is up and ready before other services attempt to connect.
- Description: The RESTful API layer that interacts with the database and the front-end.
- Ports:
- Exposes port
8080on the container, mapped to port8765on the host.
- Exposes port
- Environment Variables:
DOCKER_COMPOSE_PATH: Path to the Docker Compose directory (default:/var/tmp/amaterasu).DB_IP: The IP address or hostname for the PostgreSQL database.DB_NAME: The PostgreSQL database name.DB_USER: The PostgreSQL user.DB_PASS: The PostgreSQL password.DB_PORT: The PostgreSQL port (default:5432).ENCRYPTION_KEY: A randomly generated encryption key (using OpenSSL if not set).
- Dependencies:
- Depends on
amaterasu-dbbeing ready before starting.
- Depends on
- Ensure that Docker and Docker Compose are properly installed on your machine.
- Check the logs of any service if it doesn't start correctly:
docker-compose logs [service_name]This will display logs for a specific service, such as amaterasu-web, amaterasu-db, or amaterasu-rest.
openssl genpkey -algorithm RSA -out private.key -pkeyopt rsa_keygen_bits:409 openssl rsa -pubout -in private.key -out public.key