βοΈ Deploying to Remote Environments
SuperStack is Docker-native, so deployment is simple and portable. Here's how to deploy it to a remote server.
A clear goal of SuperStack is that only compose.yaml
should be required on
the remote server. No other file should need to be copied there.
β 1. Prepare your Images
For services that are built, add image:
URIs to your own container repository
(e.g. your Docker Hub or GitHub Container Registry account), for example:
caddy:
image: ghcr.io/youruser/yourapp-caddy
postgres:
image: ghcr.io/youruser/yourapp-postgres
π οΈ 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
Only compose.yaml
is required on the remote server.
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:
JWT_SECRET=your-secret \
CADDY_PORT=80 \
PG_USER=admin \
PG_PASS=supersecret \
POSTGREST_AUTHENTICATOR_PASS=supersecret \
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