Skip to content

Commit 5e709d5

Browse files
committed
feat(add): nodejs, goland and python
1 parent 87e046a commit 5e709d5

19 files changed

Lines changed: 842 additions & 706 deletions

File tree

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = tab
6+
indent_size = 4
7+
tab_width = 4
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[*.yml]
17+
indent_style = space
18+
indent_size = 2
19+
tab_width = 2

.github/CODE_OF_CONDUCT.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Code of Conduct
2+
3+
## Our Commitment
4+
5+
We are committed to providing a welcoming and inclusive environment for all contributors, regardless of background or experience level.
6+
7+
## Expected Behavior
8+
9+
- **Be respectful** - Treat all contributors with courtesy
10+
- **Be constructive** - Offer helpful feedback and solutions
11+
- **Be collaborative** - Work together to improve the project
12+
- **Be honest** - Acknowledge mistakes and learn from them
13+
14+
## Unacceptable Behavior
15+
16+
- Harassment, discrimination, or unwelcoming comments
17+
- Deliberate disruption of discussions
18+
- Sharing others' private information without consent
19+
- Any form of abuse or violence
20+
21+
## Reporting Issues
22+
23+
If you witness or experience a violation, please report it privately to the project maintainers by opening a confidential issue or reaching out directly.
24+
25+
## Scope
26+
27+
This Code of Conduct applies to all project spaces and interactions related to this repository.

.github/CONTRIBUTING.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Contributing Guide
2+
3+
## Adding a New Game Recipe
4+
5+
### Structure
6+
Each game recipe lives in `games/{publisher}/{game}/`:
7+
8+
```
9+
games/
10+
rockstar/
11+
fivem/
12+
Dockerfile
13+
start.sh
14+
recipe.json
15+
README.md
16+
.dockerignore
17+
```
18+
19+
### Required Files
20+
21+
1. **Dockerfile** - Alpine-based container image (keep it minimal)
22+
2. **start.sh** - Server startup script with configuration handling
23+
3. **recipe.json** - Pterodactyl egg definition (PTDL_v2 format)
24+
4. **README.md** - Quick start and usage guide
25+
5. **.dockerignore** - Exclude unnecessary files from build context
26+
27+
### Checklist
28+
29+
- [ ] Create directory structure `games/{publisher}/{game}/`
30+
- [ ] Add Dockerfile using Alpine base
31+
- [ ] Create start.sh with environment variable handling
32+
- [ ] Define recipe.json with proper Pterodactyl format
33+
- [ ] Write clear README with examples
34+
- [ ] Add game to matrix in `games.yml`:
35+
```yaml
36+
matrix:
37+
game:
38+
- minecraft
39+
- rockstar/fivem
40+
- rockstar/redm # your new game here
41+
```
42+
- [ ] Push to develop branch (triggers workflow test)
43+
- [ ] Verify build succeeds in Actions
44+
45+
### Code Standards
46+
47+
- **Dockerfile**: Use Alpine 3.20, create non-root user, include health checks
48+
- **start.sh**: Validate inputs, map Pterodactyl variables, use bash `set -e`
49+
- **Environment Variables**: Support both new and legacy variable names for backward compatibility
50+
- **Logging**: Output errors with clear prefixes (ERROR, WARN)
51+
52+
### Testing
53+
54+
1. Build locally: `docker build -f games/{publisher}/{game}/Dockerfile -t test .`
55+
2. Run container with env vars: `docker run -e KEY=value test`
56+
3. Verify server starts and responds to health checks
57+
58+
## Updating Go Recipe Versions
59+
60+
Add versions to the matrix in `go.yml`:
61+
62+
```yaml
63+
matrix:
64+
version:
65+
- "1.14"
66+
- "1.15" # add here
67+
```
68+
69+
Then create `golang/{version}/Dockerfile`.
70+
71+
## Pull Requests
72+
73+
- Keep commits focused and descriptive
74+
- Reference issues when applicable
75+
- Test changes locally before pushing
76+
- Expect workflows to run on develop branch automatically
77+
78+
## Questions?
79+
80+
Open an issue with the `question` label.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in a recipe or workflow
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Describe the Bug
11+
12+
A clear and concise description of what the bug is.
13+
14+
## Steps to Reproduce
15+
16+
1. Run `...`
17+
2. Use environment variable `...`
18+
3. See error
19+
20+
## Expected Behavior
21+
22+
What should happen instead?
23+
24+
## Actual Behavior
25+
26+
What actually happens?
27+
28+
## Environment
29+
30+
- **Recipe**: (e.g., FiveM, Go v1.14, Minecraft)
31+
- **OS**: (e.g., Windows, Linux)
32+
- **Docker version**: (if applicable)
33+
- **Pterodactyl version**: (if applicable)
34+
35+
## Logs
36+
37+
```
38+
Paste relevant error logs or output here
39+
```
40+
41+
## Additional Context
42+
43+
Any other context that might help?
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new recipe, feature, or improvement
4+
title: "[FEATURE] "
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
12+
What would you like to add or improve?
13+
14+
## Use Case
15+
16+
Why is this useful? What problem does it solve?
17+
18+
## Implementation Ideas
19+
20+
How do you think this could be implemented? (optional)
21+
22+
## Examples
23+
24+
Any examples or references? (links, code samples, etc.)
25+
26+
## Additional Context
27+
28+
Any other information?

.github/SECURITY.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
- **Current**: Latest version on `main` branch is fully supported
6+
- **Development**: `develop` branch is tested but may have unstable changes
7+
- **Past releases**: Fix security issues on request
8+
9+
## Reporting Security Issues
10+
11+
**Do not** open a public issue for security vulnerabilities.
12+
13+
Instead, email security concerns to the project maintainers privately. Include:
14+
- Description of the vulnerability
15+
- Steps to reproduce (if applicable)
16+
- Potential impact
17+
- Suggested fix (if you have one)
18+
19+
We will acknowledge receipt within 48 hours and work on a fix.
20+
21+
## Security Best Practices
22+
23+
When using game-recipes in production:
24+
25+
1. **Keep images updated** - Rebuild regularly to get base image updates
26+
2. **Use trusted sources** - Only pull from `ghcr.io/nodebytehosting/` on GitHub Container Registry
27+
3. **Rotate credentials** - Change server licenses and API keys regularly
28+
4. **Monitor logs** - Set up monitoring for container health checks
29+
5. **Use secrets** - Never commit credentials; use Pterodactyl environment variables
30+
31+
## Dependencies
32+
33+
All recipes are based on Alpine Linux. Security patches are applied automatically when rebuilding.
34+
35+
To check for known vulnerabilities:
36+
```bash
37+
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy image ghcr.io/nodebytehosting/games:fivem
38+
```

.github/pull_request_template.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Description
2+
3+
Briefly describe what this PR does.
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change fixing an issue)
8+
- [ ] New recipe or feature (non-breaking change adding functionality)
9+
- [ ] Breaking change (fix or feature causing existing functionality to change)
10+
- [ ] Documentation update
11+
12+
## Related Issues
13+
14+
Fixes #(issue number) or relates to #(issue number)
15+
16+
## Testing
17+
18+
- [ ] Tested locally with `docker build`
19+
- [ ] Verified with environment variables
20+
- [ ] Checked workflow triggers
21+
- [ ] (If applicable) Updated recipe.json
22+
23+
## Checklist
24+
25+
- [ ] Code follows project standards
26+
- [ ] Documentation is updated
27+
- [ ] No unnecessary files added
28+
- [ ] Workflow files (if modified) are valid YAML
29+
30+
## Notes
31+
32+
Add any additional context or notes here.

0 commit comments

Comments
 (0)