Spaces:
Runtime error
Runtime error
File size: 5,137 Bytes
4b12e15 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# Install No Code Architect Toolkit with Docker
Installation of No Code Architect Toolkit with Docker offers the following advantages:
- Install No Code Architect Toolkit in a clean environment.
- Simplify the setup process.
- Avoid compatibility issues across different operating systems with Docker's consistent environment.
> **Info**
> If your domain/subdomain is already pointed to the server, start at step 2.
> If you have already installed Docker and Docker-Compose, start at step 3.
---
## 1. DNS Setup
Point your domain/subdomain to the server. Add an A record to route the domain/subdomain accordingly:
- **Type**: A
- **Name**: The desired domain/subdomain
- **IP Address**: `<IP_OF_YOUR_SERVER>`
---
## 2. Install Docker
This can vary depending on the Linux distribution used. Below are instructions for Ubuntu:
### Set up Docker's APT Repository
```bash
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to APT sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```
### Install the Docker Packages
```bash
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
---
## 3. Create Docker Compose File
Create a `docker-compose.yml` file and paste the following configuration:
### With SSL Support
Enables SSL/TLS for secure, encrypted communications. Ideal for those wanting a hands-off approach to SSL setup.
```yaml
services:
traefik:
image: "traefik"
restart: unless-stopped
command:
- "--api=true"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
- "--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}"
- "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- traefik_data:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
ncat:
image: stephengpope/no-code-architects-toolkit:latest
env_file:
- .env
labels:
- traefik.enable=true
- traefik.http.routers.ncat.rule=Host(`${APP_DOMAIN}`)
- traefik.http.routers.ncat.tls=true
- traefik.http.routers.ncat.entrypoints=web,websecure
- traefik.http.routers.ncat.tls.certresolver=mytlschallenge
volumes:
- storage:/var/www/html/storage/app
- logs:/var/www/html/storage/logs
restart: unless-stopped
volumes:
traefik_data:
driver: local
storage:
driver: local
logs:
driver: local
```
---
## 4. Create `.env` File
Create an `.env` file and configure it accordingly:
```env
# The name of your application.
APP_NAME=NCAToolkit
# Debug mode setting. Set to `false` for production environments.
APP_DEBUG=false
# Your app's domain or subdomain, without the 'http://' or 'https://' prefix.
APP_DOMAIN=example.com
# Full application URL is automatically configured; no modification required.
APP_URL=https://${APP_DOMAIN}
# SSL settings
SSL_EMAIL=user@example.com
# API_KEY
# Purpose: Used for API authentication.
# Requirement: Mandatory.
API_KEY=your_api_key_here
# s3 Compatible Storage Env Vars
#
#S3_ACCESS_KEY=your_access_key
#S3_SECRET_KEY=your_secret_key
#S3_ENDPOINT_URL=https://your-endpoint-url
#S3_REGION=your-region
#S3_BUCKET_NAME=your-bucket-name
# Google Cloud Storage Env Variables
#
# GCP_SA_CREDENTIALS
# Purpose: The JSON credentials for the GCP Service Account.
# Requirement: Mandatory if using GCP storage.
#GCP_SA_CREDENTIALS=/path/to/your/gcp/service_account.json
# GCP_BUCKET_NAME
# Purpose: The name of the GCP storage bucket.
# Requirement: Mandatory if using GCP storage.
#GCP_BUCKET_NAME=your_gcp_bucket_name
# STORAGE_PATH
# Purpose: The base path for storage operations.
# Default: GCP
# Requirement: Optional.
#STORAGE_PATH=GCP
```
---
## 5. Start Docker Compose
Start No Code Architect Toolkit using the following command:
```bash
docker compose up -d
```
To view logs in real time:
```bash
docker compose logs -f
```
To stop the containers:
```bash
docker compose stop
```
To restart and reload env vars
# First update your .env file with the correct values
# Then run:
```bash
docker compose up -d --force-recreate ncat
```
---
## 6. Done
No Code Architect Toolkit is now accessible through the specified APP_URL. For example:
[https://example.com](https://example.com)
|