Skip to content

Commit

Permalink
Add: GitHub templates, workflows, and wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterVinter committed Nov 17, 2024
1 parent 4c28f23 commit e7b7c99
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Run command '...'
2. With container '....'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Windows 10]
- PowerShell Version: [e.g. 5.1]
- Docker Version: [e.g. 20.10.7]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

## Type of change
Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update

## How Has This Been Tested?
Please describe the tests that you ran to verify your changes.

- [ ] Test A
- [ ] Test B

## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published in downstream modules
37 changes: 37 additions & 0 deletions .github/workflows/powershell-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PowerShell Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Check PowerShell version
shell: pwsh
run: $PSVersionTable.PSVersion

- name: Check Docker version
shell: pwsh
run: docker --version

- name: Verify script syntax
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
foreach ($script in Get-ChildItem -Path . -Filter *.ps1) {
Write-Host "Checking $($script.Name)"
$null = [System.Management.Automation.Language.Parser]::ParseFile($script.FullName, [ref]$null, [ref]$null)
}
- name: Run PSScriptAnalyzer
shell: pwsh
run: |
Install-Module -Name PSScriptAnalyzer -Force
Invoke-ScriptAnalyzer -Path . -Recurse -Settings PSGallery
77 changes: 77 additions & 0 deletions wiki/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Docker Graceful Shutdown for Windows Wiki

Welcome to the Docker Graceful Shutdown for Windows wiki! This wiki provides detailed information about using and troubleshooting the utility.

## Table of Contents

1. [Getting Started](#getting-started)
2. [Use Cases](#use-cases)
3. [Troubleshooting](#troubleshooting)
4. [Advanced Usage](#advanced-usage)

## Getting Started

### Prerequisites
- Windows OS
- PowerShell 5.1 or higher
- Docker Desktop for Windows
- Administrator privileges (recommended)

### Installation
1. Download both script files:
- `shutdownallcontainers.cmd`
- `gracefully_shutdown_all_docker_containers.ps1`
2. Place them in the same directory
3. Ensure you have execution permissions

## Use Cases

### 1. Development Environment Shutdown
Perfect for developers who need to cleanly shut down their development environment at the end of the day.

### 2. System Maintenance
Use before system updates or maintenance to ensure all containers are properly stopped.

### 3. Container Dependency Management
Handles complex container dependencies automatically during shutdown.

## Troubleshooting

### Common Issues

#### 1. Permission Denied
```powershell
Solution: Run the script as Administrator
```

#### 2. Docker Not Running
```powershell
Solution: Ensure Docker Desktop is running and accessible
```

#### 3. Timeout Issues
```powershell
Solution: Adjust timeout settings in the PowerShell script
```

## Advanced Usage

### Custom Timeout Settings
You can modify the default timeout value in the PowerShell script:
```powershell
$timeout = 30 # Adjust this value as needed
```

### Dependency Override
To force shutdown regardless of dependencies:
```cmd
shutdownallcontainers.cmd -force
```

## Contributing to the Wiki

Feel free to contribute to this wiki by:
1. Creating new pages for specific topics
2. Adding more troubleshooting scenarios
3. Sharing your use cases
4. Improving existing documentation

0 comments on commit e7b7c99

Please sign in to comment.