Sites
| Domain | Type | Target | Status | Actions |
|---|
Docker Containers
| Container | Image | Status | Ports | Network | Actions |
|---|
Auto-Deploy Projects
| Project | Repository | Branch | Last Deploy | Status | Actions |
|---|
Payload URL:
https://panel.sdmr.dev/api/deploy/webhook | Content type: application/json | Events: Just the push event
Webhook Activity
| Time | Event | Repository | Branch | Status | Details |
|---|
Add Deploy Project
Deploy Logs:
Webhook Setup
Add this webhook to your GitHub repository settings:
HOSTINGER_API_TOKEN to your .env file.
DNS Records
| Name | Type | Content | TTL | Actions |
|---|
Add DNS Record
Caddy Logs
New Application Setup Guide
All the steps needed to add a new project to the sdmr.dev infrastructure from scratch.
Architecture Overview
Internet (:80/:443)
|
v
┌──────────────────────────┐
│ Caddy (reverse proxy) │ /root/caddy/
│ Auto SSL / HTTPS │ All traffic goes through here
└────┬─────────┬─────────┬─┘
│ │ │
v v v
┌────────┐ ┌────────┐ ┌────────┐
│ Proj 1 │ │ Proj 2 │ │ Proj 3 │ Each one is independent
│ :3000 │ │ :4000 │ │ :8080 │ docker-compose
└────────┘ └────────┘ └────────┘
└─────────┴─────────┘
"proxy" network
Step by Step Setup
Add DNS A Record
Create a new A record at your domain provider (or use the DNS tab in this panel).
| Type | Name | Content | TTL |
|---|---|---|---|
| A | myproject | 178.104.113.215 | 300 |
Create Project Directory
Connect to the server and set up the project folder.
ssh root@178.104.113.215
mkdir -p /root/myproject
cd /root/myproject
# git clone or create files
Write Dockerfile
Create an appropriate Dockerfile for your project type.
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
EXPOSE 3000
CMD ["node", "index.js"]
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "main.py"]
FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o server .
FROM alpine:3.19
COPY --from=builder /app/server /server
EXPOSE 8080
CMD ["/server"]
Write docker-compose.yml
Connect your project to the proxy network. Don't expose ports externally.
services:
app:
build: .
container_name: myproject-app # must be unique!
restart: unless-stopped
env_file: .env
networks:
- proxy
networks:
proxy:
external: true
services:
app:
build: .
container_name: myproject-app
restart: unless-stopped
env_file: .env
networks:
- proxy
- internal
depends_on:
- db
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: mydb
POSTGRES_USER: myuser
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- db-data:/var/lib/postgresql/data
networks:
- internal # internal only!
networks:
proxy:
external: true
internal:
volumes:
db-data:
proxy network. Access through internal network only.Create Caddy Site Config
You can do this directly from this panel! Use the "+ New Site" button on the Dashboard tab.
Serve your app through a container.
myprojectproxymyproject-app:3000Serve HTML/CSS/JS files directly.
blogstaticblog (/srv/blog)Or manually via terminal:
cat > /root/caddy/sites/myproject.sdmr.dev << 'EOF'
myproject.sdmr.dev {
reverse_proxy myproject-app:3000
header {
-Server
X-Content-Type-Options nosniff
X-Frame-Options DENY
}
}
EOF
Start the Project
Build and run the container.
cd /root/myproject
docker compose up -d --build
Caddy Reload
Activate the new site config. You can use the "Caddy Reload" button on the Dashboard or run it from the terminal.
docker exec caddy caddy reload --config /etc/caddy/Caddyfile
Verify
Check that everything is working properly.
# Is the container running?
docker ps | grep myproject-app
# Was the SSL certificate obtained?
docker logs caddy --tail 10
# Is the site accessible?
curl -I https://myproject.sdmr.dev
Important Rules
Each project's container_name must be unique. Caddy accesses containers by this name.
| Project | container_name | Caddy target |
|---|---|---|
| altin-api | haremaltin-api | haremaltin-api:3000 |
| caddy-panel | caddy-panel | caddy-panel:3500 |
| new project | myproject-app | myproject-app:3000 |
No project exposes ports externally. Only Caddy opens ports 80/443. Inter-container communication happens through the Docker proxy network.
Use caddy reload, not docker restart caddy. Reload updates config with zero downtime, while restart causes brief downtime.
Quick Command Reference
# --- Caddy ---
docker exec caddy caddy reload --config /etc/caddy/Caddyfile # Config reload (zero downtime)
docker exec caddy caddy validate --config /etc/caddy/Caddyfile # Validate config
docker logs caddy --tail 20 # View Caddy logs
# --- Project ---
cd /root/project-name
docker compose up -d --build # Build and start
docker compose down # Stop and remove
docker compose logs -f # Follow logs
docker compose restart # Restart
# --- General ---
docker ps -a # All containers
docker network inspect proxy # Proxy network details
docker system prune -f # Clean unused images
Removing a Project
# 1. Stop the project
cd /root/myproject
docker compose down
# 2. Delete the site from the panel (or manually)
rm /root/caddy/sites/myproject.sdmr.dev
# 3. Caddy reload
docker exec caddy caddy reload --config /etc/caddy/Caddyfile
# 4. (Optional) Delete DNS record and directory
rm -rf /root/myproject