Environment ยท Stage (NP)
Stage
The testing copy of the platform โ where changes are tried before they go live. “NP” means non-production. It runs on a single AWS server that does everything, and it’s the environment that gets deployed automatically. Currently at comingsoon.rocks, becoming travel.np.padi.com.
Summary
At a glance
- Domain
comingsoon.rocks→ soontravel.np.padi.com - Region
us-west-2(Oregon), AWS account441054594441 - Server
i-07f9b794bb3478d34ยท52.41.249.17ยทt3a.xlarge - RunsThe app, the web server, and the background-jobs workers โ all on this one machine
- DatabaseA single managed PostgreSQL instance (no cluster, no read replica)
- DeploysAutomated โ
make stage_deployor a/cscomment on a pull request
The picture
How it fits together
Read top to bottom: a tester’s request comes in at the surface, hits the one server in the middle, and reads or writes the managed data at the bottom. Colours show where each piece runs.
What talks to what
| From | To | What flows |
|---|---|---|
| Tester / browser | Nginx | Page & API requests (Nginx is reached directly) |
| Browser | CloudFront โ S3 | Images, CSS, JS |
| Nginx | Gunicorn / Node SSR | Routes each site to the right app process |
| Gunicorn (app) | RDS PostgreSQL | Reads & writes (everything) |
| Gunicorn (app) | Redis container | Sessions, cache, cached queries |
| Gunicorn (app) | Elasticsearch | Search & autosuggest |
| Gunicorn (app) | ElastiCache | Queues background jobs |
| ElastiCache | Celery (same server) | Workers pick up queued jobs |
| Celery | RDS, S3, outside services | Emails, syncs, indexing |
Detailed reference diagram
The full stage connection map from the architecture reference (scroll sideways to see it all).
One machine, everything
The all-in-one server
- Instance
i-07f9b794bb3478d34ยท52.41.249.17ยท us-west-2a - Size
t3a.xlarge
Running directly on the server native
| Service | Address | What it does |
|---|---|---|
| Nginx | :80 / :443 | The front door โ HTTPS and routing for the 5 sites. |
| Gunicorn “padi” | 127.0.0.1:7000 | The main app. |
| Gunicorn “long” | 127.0.0.1:6000 | Slow requests โ exports & admin. |
| travel_next / travel_ssr / extranet_ssr | :3003 / :3001 | Server-side rendering for the consumer & operator sites. |
| Celery workers + beat | โ | Background jobs run here too (high/mid/low/crowdin + scheduler + Flower). |
| Static sites | via Nginx | Pre-built site files served from disk. |
The automated setup deploys the main app and the slow-request pool only. The extra bot-traffic pool is a Production-only thing โ it isn’t here.
Containers on this server 3 containers
| Container | Port | What it holds / does |
|---|---|---|
| Redis redis:7.0 | 6379 | Sessions, cached queries, app cache. |
| Elasticsearch 8.12.2 | 9201โ9200 | Search & autosuggest. |
| Kibana | 5601 | A UI for Elasticsearch. |
App logs stream to AWS CloudWatch under the padi-travel-np log group.
AWS ยท database
Database AWS
Stage uses a single managed PostgreSQL instance โ not a cluster. A separate small database holds AI translations.
| Database | Size | Holds |
|---|---|---|
| RDS PostgreSQL stage-padi-travel | db.t3.large | The whole Stage database โ everything the app reads and writes. |
| RDS translations stage-padi-travel-ai-translations | db.t4g.micro | AI-translation results & feedback (Stage copy). |
Which part of the app uses which database
| App connection | Goes to | Notes |
|---|---|---|
default / long | stage-padi-travel | All reads & writes |
replica | stage-padi-travel | No separate replica on Stage โ the app safely falls back to the main database |
translations | stage translations DB | AI translation data |
The partner API is built to read from a separate replica. Stage has no replica, so those reads fall back to the main database โ automatically, with no error. To exercise true replica behaviour you need Production.
AWS + container
Caching & Redis
AWS ElastiCache
The job queue for background work. Cluster: stage-padi-travel-elastic-cache.
Redis container
The app cache โ sessions, cached queries and general cache, on the server itself.
AWS provisions the stage-padi-travel-elastic-cache queue, but the app’s stage config ships a placeholder for the queue address. The actual queue host used at runtime should be confirmed on the server.
Two engines
Search
Elasticsearch (container)
The real search engine โ autosuggest and listing search โ running as a container on the server.
OpenSearch (AWS)
A fast read-only store for a few heavy pages (Dive Shop Locator). Stage domain: padi-travel-dsl-np โ a single small node.
AWS ยท storage
Files & storage AWS
Uploads, generated files and exports live in AWS S3.
| Bucket | Holds |
|---|---|
padi-travel-export-nonprod | Data exports for the Dive Shop Locator & shop integrations (Stage). |
| S3 media / static | Uploaded images and site assets, served via the Stage CloudFront CDN. |
AWS ยท Lambda
Serverless functions AWS
The same small functions exist in a non-production form, reading from the Stage OpenSearch and database:
| Function (NP) | What it does | Reads from |
|---|---|---|
| Dive-site listing | Serves the dive-site list | OpenSearch (NP) |
| Course locator | Serves the course finder | OpenSearch (NP) + database |
| Partner shop / authorizer | Shop data & partner token checks | Database |
How these are built and deployed (AWS CDK) is on the Deployments page.
Be aware
Notes & open items
| Item | Detail |
|---|---|
| New domain coming | Stage is moving from comingsoon.rocks to travel.np.padi.com. |
| Queue host placeholder to confirm | The stage config has a placeholder for the job-queue address; confirm the real one on the server. |
| China QA sibling | A related “Stage CN” environment (travel-qa.padi.com.cn) is configured and deployable the same way, but isn’t among the currently-running servers โ likely stopped. |