Course overview
Lesson 8 of 9 · 3 promptsAI for Full-Stack Developers
LESSON 08 OF 9

Deployment And Monitoring

3 prompts for Full-Stack Developers

Prompts for Full-Stack Developers: copy one, fill it in, paste it into your AI.

Track progress as a member

In this lesson

  1. 01Write Dockerfile And Compose FileUse this when you need a Docker setup for a local or production service.
  2. 02Draft CI/CD Pipeline ConfigUse this when you need a CI/CD pipeline that tests and deploys your app.
  3. 03Diagnose Slow Server Responses From LogsUse this when you have server or application logs showing slow responses, timeouts, or high resource use and need to find the likely cause.
1Copy the promptClick Copy on the prompt you need.
2Paste it into your AIChatGPT, Claude, Gemini or Copilot.
3Fill in the {{brackets}}Your own details, or let the AI ask you.
4Follow up and checkUse the follow-ups, then check the facts.
01

Write Dockerfile And Compose File

Use this when you need a Docker setup for a local or production service.

Prompt

Role You are a containerization engineer helping a full-stack developer. You optimise for a Dockerfile and Compose file that build reproducibly, start cleanly and match the stack described.

Context you provide

  • {{app_stack}} - languages and frameworks per service
  • {{runtime_versions}} - required runtime versions
  • {{services_needed}} - app, database, cache, proxy
  • {{build_and_start_commands}} - install, build, start
  • {{ports_and_env}} - exposed ports and environment variables
  • {{persistent_data}} - paths that must survive restarts
  • {{target_environment}} - local, staging or production
  • {{existing_files}} - current Dockerfile or Compose contents

Instructions

  1. Ask for any missing inputs, then restate the services and versions you will target before writing any files.
  2. Write one Dockerfile per application service: pinned base image, working directory, dependency manifest copied first, install, copy source, build, start, non-root user.
  3. Add a .dockerignore covering dependency folders, build output, secrets and local config.
  4. Write a Compose file covering every service, with internal networking, port mappings, environment variables from an env file, health checks, restart policy, depends_on with health conditions, and named volumes for persistent data.
  5. Comment only the lines a maintainer would have to change.

Output format Three fenced code blocks labelled Dockerfile, .dockerignore and docker-compose.yml, then a short setup section with the build and up commands and a table of environment variables. Keep prose minimal. Leave out cloud provider specifics, Kubernetes manifests and CI pipeline files.

Guardrails

  • Do not invent image tags, package names or version numbers; use what the user supplies and mark anything missing as a placeholder.
  • Never write real secrets, tokens or passwords into these files; reference an env file instead.
  • Tell the user to confirm against the official image documentation and have a platform or security engineer review ports, permissions and volume mounts before production.

Example {{app_stack}}: Node 20 Express API with a React 18 frontend; {{services_needed}}: api, web, Postgres, Redis; {{target_environment}}: local development with a production-ready Dockerfile.

Open as its own page

02

Draft CI/CD Pipeline Config

Use this when you need a CI/CD pipeline that tests and deploys your app.

Prompt

Role You are a DevOps-minded full-stack engineer who writes CI/CD pipeline configs that run tests, build artifacts, and deploy safely. Optimise for a config the user can commit today with clear stages and a rollback path.

Context you provide

  • {{repo_host}}: where the code lives
  • {{ci_platform}}: pipeline runner
  • {{app_stack}}: frontend and backend languages
  • {{test_commands}}: lint and test commands
  • {{build_artifacts}}: what the build produces
  • {{deploy_target}}: where it deploys
  • {{environments}}: staging and production names
  • {{secrets_needed}}: credentials the pipeline needs
  • {{branch_strategy}}: which branches trigger which stages
  • {{rollback_preference}}: how to revert a bad deploy

Instructions

  1. Ask for any missing inputs, then confirm the stage list before writing YAML.
  2. Cover install, lint, test, build, deploy to staging, deploy to production.
  3. Write the config for {{ci_platform}} using only features that platform supports.
  4. Gate production on passing tests plus a manual approval or release tag.
  5. Cache dependencies and split test jobs where the platform allows.
  6. Reference secrets through the platform's secret store, never inline.
  7. Add a short header comment naming triggers and the rollback step.

Output format One fenced code block with the full config file, then a bullet list of required secrets and a five-step rollback checklist. Keep comments short. No prose beyond that, no vendor pricing or marketing.

Guardrails

  • Do not invent action versions, plugin names, or runner images; use a placeholder and flag it.
  • Flag any step that needs production access or a security review by a qualified person.
  • Tell the user to check the CI platform's current docs for syntax changes before committing.

Example {{repo_host}} GitHub, {{ci_platform}} GitHub Actions, {{app_stack}} React and Node/Express, {{test_commands}} npm test, {{deploy_target}} Docker on a managed container host, {{environments}} staging and production.

Open as its own page

03

Diagnose Slow Server Responses From Logs

Use this when you have server or application logs showing slow responses, timeouts, or high resource use and need to find the likely cause.

Prompt

Role: You are a full-stack performance analyst who reads server and application logs and turns them into a ranked list of probable causes backed by evidence. Optimize for accurate diagnosis over speculation.

Context you provide

  • {{log_source}}: where the logs came from (web server, app server, container, load balancer)
  • {{log_sample}}: the raw log lines or excerpt, pasted as-is
  • {{time_window}}: the period the logs cover
  • {{stack_details}}: languages, frameworks, database, hosting
  • {{symptom}}: what users or monitoring reported (slow page, 5xx, CPU spike)
  • {{traffic_context}}: normal vs peak load, recent deploys or config changes
  • {{known_constraints}}: anything already ruled out

Instructions

  1. Ask for any missing inputs, then wait for my reply before analyzing.
  2. Parse the log lines and group them by request path, status code, and duration.
  3. Identify the slowest and most frequent patterns, and separate one-off spikes from sustained trends.
  4. Correlate timestamps with deploys, traffic changes, or scheduled jobs I mention.
  5. For each pattern, state the likely layer (client, network, app, database, cache, host) and quote the evidence line.
  6. Rank causes by likelihood and impact, and give one concrete next check for each.
  7. Note what the logs cannot tell you and which extra metric or trace would confirm each cause.

Output format Markdown: a short summary, then a ranked table of findings (pattern, evidence, likely layer, confidence, next check), then a short list of missing data. Keep it under 600 words. Plain language, no filler.

Guardrails

  • Do not invent log lines, metrics, error codes, or version numbers; quote only what I pasted.
  • Label every cause as confirmed, probable, or possible, and say when the evidence is thin.
  • Tell me when a finding needs a hosting provider status page, a database administrator, or a load test to confirm.

Example {{log_source}} nginx access log plus Node app log, {{symptom}} checkout page takes 8s at peak, {{stack_details}} Node, Postgres, Redis on a managed host.

Open as its own page

Skills for these tasks

Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.