Deployment
Deployment Guide
This guide provides detailed instructions for deploying a academykit application on a Linux server, including setting up MySQL database, Docker, application server, SSL certificate deployment, and MinIO file server setup. Below is the step-by-step guide:
Prerequisites:
- MySQL database
- Ubuntu 20.04 (server)
- Docker installed on Ubuntu server
- Access to Elastic Container Registry (ECR) for pulling images
- Permissions on the server with sudo access
MySQL Database Setup:
- Update package manager:
- Install MySQL server:
- Secure MySQL installation (optional):
- Start MySQL service:
- Enable MySQL on startup:
- Access MySQL:
- Create database:
- Create user for the database:
- Grant privileges to the user:
- Flush privileges:
Docker Installation:
- Update package manager:
- Install Docker:
- Enable Docker on startup:
- Verify Docker installation:
- Test Docker:
Application Server Setup and Configuration:
- Obtain SSL certificate and private key.
- Place the SSL certificate and private key in
nginx/nginx.cert
andnginx/sssl.key
directories. - Update Dockerfile in the
nginx
folder. - Create
docker-compose.yml
file in the root directory of the application. - Update the
docker-compose.yml
file with necessary configurations. - Deployment Commands:
Certificate Deployment Guide:
- Create
docker-compose-certificate.yml
file. - Update the
docker-compose-certificate.yml
file with necessary configurations. - Deployment Commands:
File Server (MinIO) Setup Guide:
MinIO is an object storage solution that provides an Amazon Web Services S3-compatible API and supports all core S3 features. MinIO is built to deploy anywhere - public or private cloud, baremetal infrastructure, orchestrated environments, and edge infrastructure.
- Create a docker-compose-minio.yaml file and copy the content
- Update the
docker-compose-minio.yaml
file with necessary configurations.
Environment variable:
- user : Login username for application
- password : Login password
- Deployment Commands:
- Verification:
- Open in web browser.
- Enter the domain name or IP address associated with the deployed application and add :9000 at the end or map a new domain with this port.
- Verify the site is running or not.
File Server Setup Manual:
-
Login to the MinIO server using the above credentials and create a bucket named
academykit
. -
After creating open detail of that bucket and click on access policy. Select custom and write below policy:
- Create
public
andprivate
paths in theacademykit
bucket for storing files. - MinIO setup is complete.
- After setting up the file server, add the access key and the server URL in the application file storage section. To add the configuration, you need to login to the application and navigate to the setings>Admin>filestorage and change to the server.
This guide provides a comprehensive approach to deploying a academykit application on a Linux server with MySQL database, Docker, SSL certificate, and MinIO file server setup. Make sure to follow each step carefully for successful deployment.