suthep 0.1.0-beta.1 → 0.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +167 -69
- package/dist/commands/down.js +179 -0
- package/dist/commands/down.js.map +1 -0
- package/dist/commands/redeploy.js +59 -0
- package/dist/commands/redeploy.js.map +1 -0
- package/dist/commands/up.js +213 -0
- package/dist/commands/up.js.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/deployment.js +10 -1
- package/dist/utils/deployment.js.map +1 -1
- package/dist/utils/docker.js +35 -0
- package/dist/utils/docker.js.map +1 -1
- package/dist/utils/nginx.js +10 -0
- package/dist/utils/nginx.js.map +1 -1
- package/docs/README.md +25 -82
- package/docs/english/01-introduction.md +84 -0
- package/docs/english/02-installation.md +200 -0
- package/docs/english/03-quick-start.md +256 -0
- package/docs/english/04-configuration.md +358 -0
- package/docs/english/05-commands.md +363 -0
- package/docs/english/06-examples.md +456 -0
- package/docs/english/07-troubleshooting.md +417 -0
- package/docs/english/08-advanced.md +411 -0
- package/docs/english/README.md +48 -0
- package/docs/thai/01-introduction.md +84 -0
- package/docs/thai/02-installation.md +200 -0
- package/docs/thai/03-quick-start.md +256 -0
- package/docs/thai/04-configuration.md +358 -0
- package/docs/thai/05-commands.md +363 -0
- package/docs/thai/06-examples.md +456 -0
- package/docs/thai/07-troubleshooting.md +417 -0
- package/docs/thai/08-advanced.md +411 -0
- package/docs/thai/README.md +48 -0
- package/example/README.md +282 -53
- package/example/suthep-complete.yml +103 -0
- package/example/suthep-docker-only.yml +71 -0
- package/example/suthep-no-docker.yml +51 -0
- package/example/{muacle.yml → suthep-path-routing.yml} +20 -5
- package/example/suthep.example.yml +89 -0
- package/package.json +1 -1
- package/src/commands/down.ts +240 -0
- package/src/commands/redeploy.ts +78 -0
- package/src/commands/up.ts +271 -0
- package/src/index.ts +53 -0
- package/suthep-0.1.0-beta.1.tgz +0 -0
- package/suthep.example.yml +5 -0
- package/suthep.yml +39 -0
- package/docs/TRANSLATIONS.md +0 -211
- package/docs/en/README.md +0 -76
- package/docs/en/api-reference.md +0 -545
- package/docs/en/architecture.md +0 -369
- package/docs/en/commands.md +0 -273
- package/docs/en/configuration.md +0 -347
- package/docs/en/developer-guide.md +0 -588
- package/docs/en/docker-ports-config.md +0 -333
- package/docs/en/examples.md +0 -537
- package/docs/en/getting-started.md +0 -202
- package/docs/en/port-binding.md +0 -268
- package/docs/en/troubleshooting.md +0 -441
- package/docs/th/README.md +0 -64
- package/docs/th/commands.md +0 -202
- package/docs/th/configuration.md +0 -325
- package/docs/th/getting-started.md +0 -203
- package/example/docker-compose.yml +0 -76
- package/example/docker-ports-example.yml +0 -81
- package/example/port-binding-example.yml +0 -45
- package/example/suthep.yml +0 -46
- package/example/suthep=1.yml +0 -46
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
# เริ่มต้นใช้งาน Suthep
|
|
2
|
-
|
|
3
|
-
คู่มือนี้จะแนะนำคุณในการติดตั้ง Suthep และ deploy service แรกของคุณ
|
|
4
|
-
|
|
5
|
-
## การติดตั้ง
|
|
6
|
-
|
|
7
|
-
### ความต้องการเบื้องต้น
|
|
8
|
-
|
|
9
|
-
ก่อนติดตั้ง Suthep ตรวจสอบว่าคุณมี:
|
|
10
|
-
|
|
11
|
-
- **Node.js 16+** - [ดาวน์โหลด Node.js](https://nodejs.org/)
|
|
12
|
-
- **สิทธิ์ sudo** - จำเป็นสำหรับการทำงานของ Nginx และ Certbot
|
|
13
|
-
- **Docker** (ไม่บังคับ) - จำเป็นเฉพาะเมื่อ deploy Docker containers
|
|
14
|
-
|
|
15
|
-
### ติดตั้ง Suthep
|
|
16
|
-
|
|
17
|
-
1. Clone หรือดาวน์โหลด repository ของ Suthep:
|
|
18
|
-
```bash
|
|
19
|
-
git clone <repository-url>
|
|
20
|
-
cd suthep
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
2. ติดตั้ง dependencies:
|
|
24
|
-
```bash
|
|
25
|
-
npm install
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
3. Link CLI tool แบบ global:
|
|
29
|
-
```bash
|
|
30
|
-
npm link
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
สิ่งนี้ทำให้คำสั่ง `suthep` ใช้งานได้ทั่วทั้งระบบของคุณ
|
|
34
|
-
|
|
35
|
-
4. ตรวจสอบการติดตั้ง:
|
|
36
|
-
```bash
|
|
37
|
-
suthep --version
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## คู่มือเริ่มต้นใช้งานอย่างรวดเร็ว
|
|
41
|
-
|
|
42
|
-
### ขั้นตอนที่ 1: เริ่มต้นการตั้งค่า
|
|
43
|
-
|
|
44
|
-
สร้างไฟล์ configuration สำหรับโปรเจกต์ของคุณ:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
suthep init
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
คำสั่งแบบ interactive นี้จะ:
|
|
51
|
-
- ถามชื่อโปรเจกต์และเวอร์ชัน
|
|
52
|
-
- แนะนำการตั้งค่า services
|
|
53
|
-
- ตั้งค่า domain names
|
|
54
|
-
- ตั้งค่า Docker (ถ้าจำเป็น)
|
|
55
|
-
- ตั้งค่า health checks
|
|
56
|
-
- ตั้งค่าอีเมล Certbot
|
|
57
|
-
|
|
58
|
-
หรือคุณสามารถคัดลอกไฟล์ configuration ตัวอย่าง:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
cp suthep.example.yml suthep.yml
|
|
62
|
-
# แก้ไข suthep.yml ด้วยการตั้งค่าของคุณ
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### ขั้นตอนที่ 2: ติดตั้ง Prerequisites
|
|
66
|
-
|
|
67
|
-
ติดตั้งและตั้งค่า Nginx และ Certbot:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
suthep setup
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
คำสั่งนี้จะ:
|
|
74
|
-
- ติดตั้ง Nginx (ถ้ายังไม่ได้ติดตั้ง)
|
|
75
|
-
- ติดตั้ง Certbot (ถ้ายังไม่ได้ติดตั้ง)
|
|
76
|
-
- เริ่มและเปิดใช้งาน Nginx service
|
|
77
|
-
|
|
78
|
-
คุณยังสามารถติดตั้งแยกกันได้:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
suthep setup --nginx-only # ติดตั้งเฉพาะ Nginx
|
|
82
|
-
suthep setup --certbot-only # ติดตั้งเฉพาะ Certbot
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### ขั้นตอนที่ 3: Deploy Services ของคุณ
|
|
86
|
-
|
|
87
|
-
Deploy โปรเจกต์ของคุณ:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
suthep deploy
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
สิ่งนี้จะ:
|
|
94
|
-
1. โหลด configuration จาก `suthep.yml`
|
|
95
|
-
2. เริ่ม Docker containers (ถ้าตั้งค่าไว้)
|
|
96
|
-
3. Deploy แต่ละ service
|
|
97
|
-
4. สร้างและเปิดใช้งาน Nginx configurations
|
|
98
|
-
5. ขอใบรับรอง SSL จาก Let's Encrypt
|
|
99
|
-
6. Reload Nginx
|
|
100
|
-
7. ทำ health checks
|
|
101
|
-
|
|
102
|
-
## การ Deploy ครั้งแรกของคุณ
|
|
103
|
-
|
|
104
|
-
มาลอง deploy Node.js API service ง่ายๆ:
|
|
105
|
-
|
|
106
|
-
### 1. สร้าง Service ง่ายๆ
|
|
107
|
-
|
|
108
|
-
สร้าง Node.js server พื้นฐาน:
|
|
109
|
-
|
|
110
|
-
```javascript
|
|
111
|
-
// server.js
|
|
112
|
-
const http = require('http');
|
|
113
|
-
|
|
114
|
-
const server = http.createServer((req, res) => {
|
|
115
|
-
if (req.url === '/health') {
|
|
116
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
117
|
-
res.end(JSON.stringify({ status: 'ok' }));
|
|
118
|
-
} else {
|
|
119
|
-
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
|
120
|
-
res.end('Hello from Suthep!');
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
server.listen(3000, () => {
|
|
125
|
-
console.log('Server running on port 3000');
|
|
126
|
-
});
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 2. สร้าง Configuration
|
|
130
|
-
|
|
131
|
-
สร้าง `suthep.yml`:
|
|
132
|
-
|
|
133
|
-
```yaml
|
|
134
|
-
project:
|
|
135
|
-
name: my-first-app
|
|
136
|
-
version: 1.0.0
|
|
137
|
-
|
|
138
|
-
services:
|
|
139
|
-
- name: api
|
|
140
|
-
port: 3000
|
|
141
|
-
domains:
|
|
142
|
-
- api.yourdomain.com
|
|
143
|
-
healthCheck:
|
|
144
|
-
path: /health
|
|
145
|
-
interval: 30
|
|
146
|
-
|
|
147
|
-
nginx:
|
|
148
|
-
configPath: /etc/nginx/sites-available
|
|
149
|
-
reloadCommand: sudo nginx -t && sudo systemctl reload nginx
|
|
150
|
-
|
|
151
|
-
certbot:
|
|
152
|
-
email: your-email@example.com
|
|
153
|
-
staging: false
|
|
154
|
-
|
|
155
|
-
deployment:
|
|
156
|
-
strategy: rolling
|
|
157
|
-
healthCheckTimeout: 30000
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### 3. เริ่ม Service ของคุณ
|
|
161
|
-
|
|
162
|
-
รัน Node.js server ของคุณ:
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
node server.js
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### 4. Setup และ Deploy
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
# Setup Nginx และ Certbot
|
|
172
|
-
suthep setup
|
|
173
|
-
|
|
174
|
-
# Deploy
|
|
175
|
-
suthep deploy
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### 5. ตรวจสอบ
|
|
179
|
-
|
|
180
|
-
เปิด `https://api.yourdomain.com` ในเบราว์เซอร์ของคุณ คุณควรเห็น "Hello from Suthep!" และใบรับรอง SSL ควรจะถูกต้อง
|
|
181
|
-
|
|
182
|
-
## ขั้นตอนถัดไป
|
|
183
|
-
|
|
184
|
-
- อ่าน [คู่มืออ้างอิงการตั้งค่า](./configuration.md) เพื่อเรียนรู้เกี่ยวกับตัวเลือกการตั้งค่าทั้งหมด
|
|
185
|
-
- ดู [ตัวอย่าง](../en/examples.md) สำหรับสถานการณ์การ deploy ที่ซับซ้อนมากขึ้น *(English)*
|
|
186
|
-
- ตรวจสอบ [คู่มืออ้างอิงคำสั่ง](./commands.md) สำหรับเอกสารคำสั่งแบบละเอียด
|
|
187
|
-
|
|
188
|
-
## ปัญหาที่พบบ่อย
|
|
189
|
-
|
|
190
|
-
หากคุณพบปัญหาระหว่างการตั้งค่า:
|
|
191
|
-
|
|
192
|
-
1. **Permission denied**: ตรวจสอบว่าคุณมีสิทธิ์ sudo
|
|
193
|
-
2. **Nginx not found**: รัน `suthep setup` เพื่อติดตั้ง
|
|
194
|
-
3. **Domain not resolving**: ตรวจสอบว่า DNS ของ domain ชี้ไปที่ IP ของ server ของคุณ
|
|
195
|
-
4. **SSL certificate failed**: ตรวจสอบว่า domain ของคุณเข้าถึงได้จากสาธารณะและพอร์ต 80 เปิดอยู่
|
|
196
|
-
|
|
197
|
-
สำหรับความช่วยเหลือในการแก้ไขปัญหามากขึ้น ดู [คู่มือแก้ไขปัญหา](../en/troubleshooting.md) *(English)*
|
|
198
|
-
|
|
199
|
-
## ภาษาอื่นๆ / Other Languages
|
|
200
|
-
|
|
201
|
-
- [English](../en/getting-started.md) - English version / เวอร์ชันภาษาอังกฤษ
|
|
202
|
-
- [ไทย](./getting-started.md) - เวอร์ชันภาษาไทย (ปัจจุบัน)
|
|
203
|
-
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
version: "3.8"
|
|
2
|
-
|
|
3
|
-
services:
|
|
4
|
-
# Example 2: Docker container service from example.yml
|
|
5
|
-
webapp:
|
|
6
|
-
image: nginx:latest
|
|
7
|
-
container_name: webapp-container
|
|
8
|
-
ports:
|
|
9
|
-
- "8080:80"
|
|
10
|
-
networks:
|
|
11
|
-
- suthep-network
|
|
12
|
-
healthcheck:
|
|
13
|
-
test: ["CMD", "curl", "-f", "http://localhost/"]
|
|
14
|
-
interval: 30s
|
|
15
|
-
timeout: 10s
|
|
16
|
-
retries: 3
|
|
17
|
-
restart: unless-stopped
|
|
18
|
-
|
|
19
|
-
# Example 3: Multiple subdomains with Docker from example.yml
|
|
20
|
-
dashboard:
|
|
21
|
-
image: myapp/dashboard:latest
|
|
22
|
-
container_name: dashboard-container
|
|
23
|
-
ports:
|
|
24
|
-
- "5000:5000"
|
|
25
|
-
networks:
|
|
26
|
-
- suthep-network
|
|
27
|
-
environment:
|
|
28
|
-
DATABASE_URL: postgresql://postgres:5432/dashboard
|
|
29
|
-
REDIS_URL: redis://redis:6379
|
|
30
|
-
healthcheck:
|
|
31
|
-
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
|
|
32
|
-
interval: 60s
|
|
33
|
-
timeout: 10s
|
|
34
|
-
retries: 3
|
|
35
|
-
depends_on:
|
|
36
|
-
- postgres
|
|
37
|
-
- redis
|
|
38
|
-
restart: unless-stopped
|
|
39
|
-
|
|
40
|
-
# Database service for database-proxy example
|
|
41
|
-
postgres:
|
|
42
|
-
image: postgres:latest
|
|
43
|
-
container_name: postgres-container
|
|
44
|
-
ports:
|
|
45
|
-
- "5432:5432"
|
|
46
|
-
networks:
|
|
47
|
-
- suthep-network
|
|
48
|
-
environment:
|
|
49
|
-
POSTGRES_DB: dashboard
|
|
50
|
-
POSTGRES_USER: postgres
|
|
51
|
-
POSTGRES_PASSWORD: postgres
|
|
52
|
-
volumes:
|
|
53
|
-
- postgres-data:/var/lib/postgresql/data
|
|
54
|
-
restart: unless-stopped
|
|
55
|
-
|
|
56
|
-
# Redis service for dashboard
|
|
57
|
-
redis:
|
|
58
|
-
image: redis:latest
|
|
59
|
-
container_name: redis-container
|
|
60
|
-
ports:
|
|
61
|
-
- "6379:6379"
|
|
62
|
-
networks:
|
|
63
|
-
- suthep-network
|
|
64
|
-
restart: unless-stopped
|
|
65
|
-
|
|
66
|
-
networks:
|
|
67
|
-
suthep-network:
|
|
68
|
-
driver: bridge
|
|
69
|
-
|
|
70
|
-
volumes:
|
|
71
|
-
postgres-data:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
project:
|
|
2
|
-
name: docker-ports-example
|
|
3
|
-
version: 1.0.0
|
|
4
|
-
|
|
5
|
-
services:
|
|
6
|
-
# Example 1: Same port on host and container (3000:3000)
|
|
7
|
-
- name: api-same-port
|
|
8
|
-
port: 3000 # Host port: 3000
|
|
9
|
-
domains:
|
|
10
|
-
- api1.example.com
|
|
11
|
-
docker:
|
|
12
|
-
image: myapp/api:latest
|
|
13
|
-
container: api-same-port-container
|
|
14
|
-
port: 3000 # Container port: 3000
|
|
15
|
-
healthCheck:
|
|
16
|
-
path: /health
|
|
17
|
-
interval: 30
|
|
18
|
-
|
|
19
|
-
# Example 2: Different host and container ports (3002:3000)
|
|
20
|
-
- name: api-different-port
|
|
21
|
-
port: 3002 # Host port: 3002 (external access)
|
|
22
|
-
domains:
|
|
23
|
-
- api2.example.com
|
|
24
|
-
docker:
|
|
25
|
-
image: myapp/api:latest
|
|
26
|
-
container: api-different-port-container
|
|
27
|
-
port: 3000 # Container port: 3000 (app listens here inside)
|
|
28
|
-
healthCheck:
|
|
29
|
-
path: /health
|
|
30
|
-
interval: 30
|
|
31
|
-
|
|
32
|
-
# Example 3: Nginx with port mapping (8080:80)
|
|
33
|
-
- name: web
|
|
34
|
-
port: 8080 # Host port: 8080
|
|
35
|
-
domains:
|
|
36
|
-
- web.example.com
|
|
37
|
-
docker:
|
|
38
|
-
image: nginx:alpine
|
|
39
|
-
container: web-container
|
|
40
|
-
port: 80 # Container port: 80 (Nginx listens on 80)
|
|
41
|
-
healthCheck:
|
|
42
|
-
path: /
|
|
43
|
-
interval: 30
|
|
44
|
-
|
|
45
|
-
# Example 4: Multiple services with different ports
|
|
46
|
-
- name: service-a
|
|
47
|
-
port: 4000 # Host: 4000
|
|
48
|
-
domains:
|
|
49
|
-
- service-a.example.com
|
|
50
|
-
docker:
|
|
51
|
-
image: myapp/service-a:latest
|
|
52
|
-
container: service-a-container
|
|
53
|
-
port: 3000 # Container: 3000
|
|
54
|
-
healthCheck:
|
|
55
|
-
path: /health
|
|
56
|
-
interval: 30
|
|
57
|
-
|
|
58
|
-
- name: service-b
|
|
59
|
-
port: 4001 # Host: 4001
|
|
60
|
-
domains:
|
|
61
|
-
- service-b.example.com
|
|
62
|
-
docker:
|
|
63
|
-
image: myapp/service-b:latest
|
|
64
|
-
container: service-b-container
|
|
65
|
-
port: 3000 # Container: 3000 (can be same, containers are isolated)
|
|
66
|
-
healthCheck:
|
|
67
|
-
path: /health
|
|
68
|
-
interval: 30
|
|
69
|
-
|
|
70
|
-
nginx:
|
|
71
|
-
configPath: /etc/nginx/sites-available
|
|
72
|
-
reloadCommand: sudo nginx -t && sudo systemctl reload nginx
|
|
73
|
-
|
|
74
|
-
certbot:
|
|
75
|
-
email: admin@example.com
|
|
76
|
-
staging: false
|
|
77
|
-
|
|
78
|
-
deployment:
|
|
79
|
-
strategy: rolling
|
|
80
|
-
healthCheckTimeout: 30000
|
|
81
|
-
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
project:
|
|
2
|
-
name: port-binding-example
|
|
3
|
-
version: 1.0.0
|
|
4
|
-
|
|
5
|
-
services:
|
|
6
|
-
# Example: Bind host port 3002 to container port 3000
|
|
7
|
-
- name: api
|
|
8
|
-
port: 3002 # Host port: accessible at localhost:3002
|
|
9
|
-
path: /api
|
|
10
|
-
domains:
|
|
11
|
-
- api.example.com
|
|
12
|
-
docker:
|
|
13
|
-
image: myapp/api:latest
|
|
14
|
-
container: api-container
|
|
15
|
-
port: 3000 # Container port: app listens on 3000 inside container
|
|
16
|
-
healthCheck:
|
|
17
|
-
path: /health
|
|
18
|
-
interval: 30
|
|
19
|
-
|
|
20
|
-
# Example: Same port on both host and container
|
|
21
|
-
- name: web
|
|
22
|
-
port: 8080 # Host port: 8080
|
|
23
|
-
path: /
|
|
24
|
-
domains:
|
|
25
|
-
- example.com
|
|
26
|
-
docker:
|
|
27
|
-
image: nginx:alpine
|
|
28
|
-
container: web-container
|
|
29
|
-
port: 80 # Container port: Nginx listens on 80 inside container
|
|
30
|
-
healthCheck:
|
|
31
|
-
path: /
|
|
32
|
-
interval: 30
|
|
33
|
-
|
|
34
|
-
nginx:
|
|
35
|
-
configPath: /etc/nginx/sites-available
|
|
36
|
-
reloadCommand: sudo nginx -t && sudo systemctl reload nginx
|
|
37
|
-
|
|
38
|
-
certbot:
|
|
39
|
-
email: admin@example.com
|
|
40
|
-
staging: false
|
|
41
|
-
|
|
42
|
-
deployment:
|
|
43
|
-
strategy: rolling
|
|
44
|
-
healthCheckTimeout: 30000
|
|
45
|
-
|
package/example/suthep.yml
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
project:
|
|
2
|
-
name: muacle-app
|
|
3
|
-
version: 1.0.0
|
|
4
|
-
|
|
5
|
-
services:
|
|
6
|
-
# API service on /api path
|
|
7
|
-
- name: api
|
|
8
|
-
port: 3001
|
|
9
|
-
path: /api
|
|
10
|
-
domains:
|
|
11
|
-
- muacle.com
|
|
12
|
-
docker:
|
|
13
|
-
image: api:latest
|
|
14
|
-
container: api-container
|
|
15
|
-
port: 3001
|
|
16
|
-
# healthCheck:
|
|
17
|
-
# path: /health
|
|
18
|
-
# interval: 30
|
|
19
|
-
environment:
|
|
20
|
-
NODE_ENV: production
|
|
21
|
-
|
|
22
|
-
# UI service on root path
|
|
23
|
-
- name: ui
|
|
24
|
-
port: 3002
|
|
25
|
-
path: /
|
|
26
|
-
domains:
|
|
27
|
-
- muacle.com
|
|
28
|
-
docker:
|
|
29
|
-
image: frontend-api:latest
|
|
30
|
-
container: ui-container
|
|
31
|
-
port: 3000
|
|
32
|
-
# healthCheck:
|
|
33
|
-
# path: /
|
|
34
|
-
# interval: 30
|
|
35
|
-
|
|
36
|
-
nginx:
|
|
37
|
-
configPath: /etc/nginx/sites-available
|
|
38
|
-
reloadCommand: sudo nginx -t && sudo systemctl reload nginx
|
|
39
|
-
|
|
40
|
-
certbot:
|
|
41
|
-
email: admin@muacle.com
|
|
42
|
-
staging: false
|
|
43
|
-
|
|
44
|
-
deployment:
|
|
45
|
-
strategy: rolling
|
|
46
|
-
healthCheckTimeout: 30000
|
package/example/suthep=1.yml
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
project:
|
|
2
|
-
name: my-app
|
|
3
|
-
version: 1.0.0
|
|
4
|
-
|
|
5
|
-
services:
|
|
6
|
-
# Example 1: Simple Node.js service
|
|
7
|
-
- name: api
|
|
8
|
-
port: 3001
|
|
9
|
-
docker:
|
|
10
|
-
image: muacle-api:latest
|
|
11
|
-
container: api
|
|
12
|
-
port: 3000
|
|
13
|
-
domains:
|
|
14
|
-
- x.muacle.com
|
|
15
|
-
healthCheck:
|
|
16
|
-
path: /api/v1/health
|
|
17
|
-
interval: 30
|
|
18
|
-
environment:
|
|
19
|
-
NODE_ENV: production
|
|
20
|
-
PORT: 3001
|
|
21
|
-
|
|
22
|
-
# Example 2: Docker container service
|
|
23
|
-
- name: webapp
|
|
24
|
-
port: 3000
|
|
25
|
-
docker:
|
|
26
|
-
image: muacle-frontend:latest
|
|
27
|
-
container: frontend
|
|
28
|
-
port: 3000
|
|
29
|
-
domains:
|
|
30
|
-
- x.muacle.com
|
|
31
|
-
healthCheck:
|
|
32
|
-
path: /
|
|
33
|
-
interval: 30
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
nginx:
|
|
37
|
-
configPath: /etc/nginx/sites-available
|
|
38
|
-
reloadCommand: sudo nginx -t && sudo systemctl reload nginx
|
|
39
|
-
|
|
40
|
-
certbot:
|
|
41
|
-
email: admin@example.com
|
|
42
|
-
staging: false # Set to true for testing
|
|
43
|
-
|
|
44
|
-
deployment:
|
|
45
|
-
strategy: rolling # Options: rolling, blue-green
|
|
46
|
-
healthCheckTimeout: 30000 # milliseconds
|