Link site
Link a site to a Docker container to proxy requests to the container.
POST /api/servers/{server}/docker/containers/{container}/site/link
Parameters
Name | Type | Description |
---|---|---|
site_id | integer | The ID of the site to link to the container |
port | integer | The port on which the container is listening |
host | string | IP address of the container (usually 127.0.0.1) |
Example Request
curl -X POST "https://ploi.io/api/servers/123/docker/containers/456/site/link" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"site_id": 789,
"port": 8080,
"host": "127.0.0.1"
}'
Response
{
"message": "Docker container is being proxied via example.com on port 8080"
}