Deployment
Deploying SkyTalk to the DigitalOcean droplet — Docker Compose workflow, schema migrations, and nginx setup.
Deployment
SkyTalk runs on a single DigitalOcean droplet. The server and Postgres are managed by Docker Compose. This page covers the full deploy workflow.
Droplet Specs
| Property | Value |
|---|---|
| Provider | DigitalOcean |
| OS | Ubuntu LTS |
| CPU | 2 vCPU |
| RAM | 4 GB |
| Disk | 120 GB |
| IP | 134.122.32.45 |
| SSH user | root |
First-Time Setup
These steps are done once when the droplet is first provisioned.
1. Install Docker
Do not install Docker via snap (snap install docker). Snap Docker has permission issues with bind mounts. Use get.docker.com (real Docker CE).
2. Clone the repository
3. Create the .env file
Set real values for POSTGRES_PASSWORD and JWT_SECRET. Leave DATABASE_URL using the db hostname (Docker internal network).
4. Start the stack
5. Seed the database
6. Verify
Routine Deployment (code updates)
When code changes need to be deployed:
1. Pull the latest code
2. Rebuild and restart the server container
The server container re-runs prisma db push on startup via entrypoint.sh. If there are new schema changes, they will be applied automatically.
prisma db push is safe for additive changes (new tables, new columns). If a migration involves dropping columns or tables, verify the impact before deploying.
3. Check the server came up
Updating Only Postgres
Postgres is not rebuilt on every deploy. To update the Postgres image:
This restarts only the db container. The server will reconnect automatically (Prisma connection pooling handles transient disconnects).
Viewing Production Logs
Environment Variable Changes
If .env values change (e.g. rotating JWT_SECRET):
- Edit
.envon the droplet. - Restart the server container:
docker compose up -d server
Existing JWTs signed with the old secret will be invalid. All active sessions will need to log in again.
nginx (Optional — SSL Termination)
For HTTPS, nginx runs as a reverse proxy in front of Docker.
A config file is at packages/server/nginx/forbiddenlan.foo.conf. To activate it:
Then get a TLS certificate:
When nginx is active, change the docker-compose.yml port binding from "3000:3000" to "127.0.0.1:3000:3000" so the server is no longer directly accessible on the public IP.
Rollback
There is no automated rollback. To revert:
If the schema was changed, rollback may require restoring from a database backup. Keep periodic pg_dump snapshots for production.
Database Backups
Not automated in v1. Manual backup:
Restore: