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