Skip to content

☁️ Deploying to Remote Environments

SuperStack is Docker-native, so deployment is simple and portable. Here's how to deploy it to a remote server.

βœ… 1. Set Your Image Names

Change the image names to your own (e.g. using your Docker Hub or GitHub Container Registry account) in compose.yaml, for example:

postgres:
  image: ghcr.io/youruser/yourapp-postgres
caddy:
  image: ghcr.io/youruser/yourapp-caddy

πŸ› οΈ 2. Build and Push your Images

Build your images locally and push to your registry:

docker compose build
docker compose push

πŸ“¦ 3. Deploy the Compose File

The only file needed for SuperStack to work on the remote server is compose.yaml.

Copy it to your server:

scp compose.yaml youruser@yourserver:

πŸš€ 4. Launch your Stack

SSH into your server and bring up the stack.

For production, avoid using .env files. Instead, set secrets directly:

CADDY_PORT=80 \
PG_USER=admin \
PG_PASS=supersecret \
POSTGREST_AUTHENTICATOR_PASS=supersecret \
JWT_SECRET=your-secret \
docker compose up -d

πŸ’‘ Avoid leaking secrets by disabling shell history.

Alternatively, use environment injection in your CI/CD.


That’s it β€” your backend is live.

If this is the first time bringing up your stack, the migrations will run automatically. Subsequently, to upgrade your app you should:

docker compose pull
docker compose up -d
docker compose exec postgres migrate