AlmaSpot

7. Deployment

Index

  1. Analysis
  2. Design
  3. Architecture
  4. Implementation
  5. DevOps
  6. License
  7. Deployment

The application deployment adopts a Container-Based approach, ensuring isolation, reproducibility, and independence from the host environment. The entire architecture is defined declaratively via a docker-compose.prod.yml file, which orchestrates service execution within a dedicated virtual network (almaspot-network).

7.1. Container Architecture

The configuration includes the following services:

7.2. Client Build

For the client, a Multi-Stage Build strategy defined in the Dockerfile was adopted:

  1. Build: a Node.js image compiles the Vue source code, injecting necessary environment variables (such as the VAPID public key and the relative API URL).
  2. Serve: the compiled artifacts are copied into a lightweight Nginx image (Alpine Linux), discarding all source code and development dependencies (node_modules), drastically reducing the final size.

7.3. Setup and Execution

System deployment requires Docker and Docker Compose installed on the host machine.

  1. Clone the repository: download the project source code by cloning the GitHub repository:

    git clone https://github.com/fairlycodeparents/AlmaSpot.git

  2. Configuration: create a .env file in the project root (based on the .env.example template) containing database credentials, VAPID cryptographic keys, JWT secrets, the provider URL, and the Gemini API key.
  3. Startup: the following command pulls the latest image versions for the backend, builds the optimized frontend, and starts the entire stack in the background:

    docker compose -f docker-compose.prod.yml up -d

  4. Access: once initialization is complete, the entire platform is accessible to the end user at http://localhost:80.