🛠️ Add scaffolding for Synology Docker deployment
This commit is contained in:
52
resources/skills/synology-docker-deploy/SKILL.md
Normal file
52
resources/skills/synology-docker-deploy/SKILL.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
name: synology-docker-deploy
|
||||
description: "Use when scaffolding Docker packaging and direct SSH deployment to a Synology host for a project that should be ready to run after setup."
|
||||
argument-hint: "project-root=<path> service=<name> stack=<auto|node|python|generic> mode=<dry-run|apply> app-port=<port> container-port=<port>"
|
||||
---
|
||||
|
||||
# Synology Docker Deploy
|
||||
|
||||
Use this skill when you want a portable, repeatable setup for Dockerizing a
|
||||
project and deploying it to Synology over SSH without requiring a container
|
||||
registry.
|
||||
|
||||
## Procedure
|
||||
|
||||
1. Confirm required inputs: `project-root`, `service`, `stack`, and deploy mode.
|
||||
2. Run `resources/scripts/scaffold-synology-deploy.sh` to scaffold Docker and
|
||||
deployment files directly into the target project.
|
||||
3. Prefer `--mode dry-run` first to review planned changes before writing files.
|
||||
4. For Node projects, let the scaffold update `package.json` scripts so deploy
|
||||
commands are available immediately.
|
||||
5. Copy `deploy/synology/deploy.env.example` to `deploy/synology/deploy.env`
|
||||
and provide environment values.
|
||||
6. Run `bash deploy/synology/deploy.sh --dry-run` from the target project to
|
||||
verify inputs and planned remote actions.
|
||||
7. Run `bash deploy/synology/deploy.sh` for actual deploy once dry-run output
|
||||
looks correct.
|
||||
8. Use `DEPLOY_TARGET=internal` or `DEPLOY_TARGET=external` to switch between
|
||||
internal and external host routing without changing scripts.
|
||||
|
||||
## Outputs
|
||||
|
||||
- `Dockerfile` (stack-aware default)
|
||||
- `.dockerignore`
|
||||
- `deploy/synology/deploy.sh`
|
||||
- `deploy/synology/deploy.env.example`
|
||||
- `deploy/synology/compose.yaml`
|
||||
- `deploy/synology/README.md`
|
||||
- Optional `package.json` script updates for Node projects
|
||||
|
||||
## Do Not Use
|
||||
|
||||
- Do not use this workflow when the project requires a registry-only release
|
||||
pipeline.
|
||||
- Do not use this workflow when Kubernetes manifests are the primary deployment
|
||||
target.
|
||||
- Do not store secrets in generated files committed to source control.
|
||||
|
||||
## Notes
|
||||
|
||||
- This workflow is environment-variable-first and keeps secrets out of the repo.
|
||||
- The generated deploy path uses direct `docker save` + `scp` + remote
|
||||
`docker load` on Synology.
|
||||
@@ -0,0 +1,15 @@
|
||||
# Required Runtime Variables
|
||||
|
||||
Populate these values in `deploy/synology/deploy.env` in the target project:
|
||||
|
||||
- `SYNOLOGY_USER`
|
||||
- `SYNOLOGY_SSH_PORT`
|
||||
- `SYNOLOGY_HOST_INTERNAL`
|
||||
- `SYNOLOGY_HOST_EXTERNAL`
|
||||
- `REMOTE_APP_PATH`
|
||||
- `SERVICE_NAME`
|
||||
- `IMAGE_NAME`
|
||||
- `IMAGE_TAG`
|
||||
- `APP_PORT`
|
||||
- `CONTAINER_PORT`
|
||||
- `DEPLOY_TARGET` (`internal` or `external`)
|
||||
Reference in New Issue
Block a user