βοΈ 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