Going Live
Guidance on deploying SolidX applications to production environments.
This section provides guidance on how to deploy your SolidX applications to production. We cover a range of deployment strategies to suit your needs, from traditional virtual machines to modern container-based workflows.
- Virtual Machine — Deploy your application to a traditional virtual machine. This guide covers setting up your environment, configuring a process manager, and using Nginx as a reverse proxy.
- Amazon ECS — Use AWS Fargate to deploy your application in a serverless environment. This guide will walk you through containerizing your app, pushing it to ECR, and setting up your ECS cluster.
- Docker — Containerize your application with Docker for a consistent and reproducible deployment. This guide covers multi-stage builds and setting up a production-ready Docker Compose file.
Going Live with a Solid App Template
This guide provides instructions on how to deploy a Solid application generated from the create-solid-app template.
We will cover two approaches: a manual deployment and an advanced deployment using Docker.
Manual Deployment
This approach involves building the frontend and backend applications and running them as separate processes.
Prerequisites
- Node.js and npm installed on your server.
- A database (e.g., PostgreSQL, MongoDB) running and accessible from your server.
Steps
-
Clone your project:
git clone <your-project-repository> cd <your-project-directory> -
Set up the backend: Navigate to the
solid-apidirectory:cd solid-apiInstall dependencies:
npm installCreate a
.envfile and configure your database connection and other environment variables. You can use.env.exampleas a reference.Build the application:
npm run buildRun the application:
npm run start:prod -
Set up the frontend: Navigate to the
solid-uidirectory:cd ../solid-uiInstall dependencies:
npm installCreate a
.envfile and configure your API URL and other environment variables.Build the application:
npm run buildRun the application:
npm run start
Your Solid application should now be running. You may want to use a process manager like pm2 to keep the applications running in the background.
Advanced Deployment (Docker)
This approach uses Docker to containerize the frontend and backend applications.
Prerequisites
- Docker and Docker Compose installed on your server.
Steps
-
Clone your project:
git clone <your-project-repository> cd <your-project-directory> -
Configure your environment: Create a
.envfile in the root of your project and configure your database connection, API URL, and other environment variables. Thedocker-compose.ymlfile is set up to use this file. -
Build and run the containers:
docker-compose up -d --build
This command will build the Docker images for the solid-api and solid-ui applications and run them in the background.
Your Solid application is now running and accessible on the ports specified in your docker-compose.yml file.
Explore the guides to find the deployment strategy that best fits your project's needs. Each guide provides a step-by-step walkthrough to get your SolidX application up and running in a production environment.