Skip to content

Commit 267c173

Browse files
committed
update deploy docs
1 parent cb7e248 commit 267c173

3 files changed

Lines changed: 23 additions & 11 deletions

File tree

.github/workflows/cd-ec2.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
types:
77
- completed
88
branches:
9-
- main
9+
- master
1010
workflow_dispatch:
1111

1212
concurrency:
@@ -64,8 +64,8 @@ jobs:
6464
cd "${EC2_DEPLOY_PATH}"
6565
6666
git fetch --prune origin
67-
git checkout main
68-
git pull --ff-only origin main
67+
git checkout master
68+
git pull --ff-only origin master
6969
7070
docker compose -f docker-compose.prod.yml up -d --build redis web
7171
docker compose -f docker-compose.prod.yml exec -T web python manage.py migrate --noinput

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- main
7+
- master
88

99
jobs:
1010
test-and-build:

DEPLOYMENT.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Create `/etc/nginx/sites-available/tigerpath`:
8282
```nginx
8383
server {
8484
listen 80;
85-
server_name your-domain.com www.your-domain.com;
85+
server_name path.tigerapps.org;
8686
8787
client_max_body_size 20m;
8888
@@ -106,11 +106,23 @@ sudo nginx -t
106106
sudo systemctl reload nginx
107107
```
108108

109-
## 7. Enable HTTPS (Let’s Encrypt)
109+
## 7. Configure DNS in Cloudflare (`path.tigerapps.org`)
110+
111+
In Cloudflare (zone: `tigerapps.org`), create the DNS record:
112+
113+
- `A` record: `path` -> `<EC2_PUBLIC_IP>`
114+
115+
Recommended Cloudflare settings:
116+
117+
- Start with `Proxy status = DNS only` during initial certificate setup
118+
- After HTTPS is working, switch to `Proxied` if you want Cloudflare proxy/CDN/WAF
119+
- In **SSL/TLS**, use `Full` during setup, then `Full (strict)` after Let’s Encrypt is installed
120+
121+
## 8. Enable HTTPS (Let’s Encrypt)
110122

111123
```bash
112124
sudo apt-get install -y certbot python3-certbot-nginx
113-
sudo certbot --nginx -d your-domain.com -d www.your-domain.com
125+
sudo certbot --nginx -d path.tigerapps.org
114126
```
115127

116128
Test renewal:
@@ -119,11 +131,11 @@ Test renewal:
119131
sudo certbot renew --dry-run
120132
```
121133

122-
## 8. Operational Commands
134+
## 9. Operational Commands
123135

124136
```bash
125137
# update app code
126-
git pull --ff-only origin main
138+
git pull --ff-only origin master
127139

128140
# rebuild/restart app
129141
docker compose -f docker-compose.prod.yml up -d --build
@@ -136,7 +148,7 @@ docker compose -f docker-compose.prod.yml logs -f web
136148
docker compose -f docker-compose.prod.yml logs -f redis
137149
```
138150

139-
## 9. GitHub Actions CI/CD
151+
## 10. GitHub Actions CI/CD
140152

141153
Two workflows are included:
142154
- `.github/workflows/ci.yml` (test/build on PRs + pushes)
@@ -164,7 +176,7 @@ CD workflow executes on EC2:
164176
3. `python manage.py migrate` inside `web`
165177
4. basic health output via `docker compose ps`
166178

167-
## 10. Architecture Recap
179+
## 11. Architecture Recap
168180

169181
- Postgres: external RDS (`DATABASE_URL` in `.env`)
170182
- Redis: local Docker container on EC2 (`redis` service)

0 commit comments

Comments
 (0)