N
NexusDigitalLabs
← Back to Academy

Phase 1 — Foundations · Lesson 16 · 20 XP

Deployment

Deploying means getting your container or app running on infrastructure other people can reach — Fly.io, Railway, and Cloud Run are common choices that take a Dockerfile or a git push and handle the servers for you. Production secrets (database passwords, API keys) live in the platform's environment variable/secrets settings, never in a committed .env file.

A health check is a simple endpoint (often GET /health returning 200) that the deployment platform polls to confirm your app is actually alive before routing traffic to it, and to restart it automatically if it stops responding.

Exercise

Deploy your Lesson 14/15 API to Fly.io, Railway, or Cloud Run. Set the database URL as a platform secret, not a committed file. Add a /health endpoint and confirm the live URL responds correctly end to end.

Check yourself

1. Why should a database password never be committed to git, even in a private repository?

2. What is a health check endpoint, and why does a deployment platform rely on one?

← Previous lesson

Docker

Answer the check-yourself questions to unlock this