Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

Commit 86240b7

Browse files
authored
Add Docker development environment and initial configuration files (#1)
* Add Docker development environment and initial configuration files * Update VSCode settings, add CODEOWNERS, pull request template, and Prettier configuration * Configure super-linter to trigger on pushes to the main branch * Replace Docker image verification workflow with Devcontainer image scanning workflow * Refine CODEOWNERS file, update Devcontainer verification workflow permissions, and adjust Prettier configuration * Exclude devcontainer Dockerfile from super-linter validation * Update super-linter configuration to exclude additional files from validation * Refactor workflow files for consistency and clarity in Devcontainer and super-linter configurations
1 parent 9fc7d41 commit 86240b7

File tree

11 files changed

+157
-2
lines changed

11 files changed

+157
-2
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM alpine:latest
2+
3+
# Install common tools
4+
RUN apk add --no-cache bash git \
5+
postfix
6+
7+
# Setup default user
8+
ARG USERNAME=vscode
9+
ARG USER_UID=1000
10+
ARG USER_GID=$USER_UID
11+
12+
RUN addgroup -g $USER_GID -S $USERNAME && \
13+
adduser -u $USER_UID -S -G $USERNAME -s /bin/bash $USERNAME
14+
15+
# Switch to the default user
16+
USER $USERNAME

.devcontainer/devcontainer.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "Postfix Development Container",
3+
"dockerFile": "Dockerfile",
4+
"customizations": {
5+
"settings": {
6+
"terminal.integrated.shell.linux": "/bin/bash"
7+
}
8+
},
9+
"remoteUser": "vscode"
10+
}

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default owner(s) for everything in the repository
2+
* @Vianpyro

.github/pull_request_template.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Description
2+
3+
- A clear and concise description of the changes introduced in this pull request.
4+
5+
## Related Issues
6+
7+
- Closes #ISSUE_NUMBER (if applicable)
8+
9+
## Changes Made
10+
11+
- List the main changes made in this PR:
12+
- [ ] Change 1
13+
- [ ] Change 2
14+
- [ ] Change 3
15+
16+
## Screenshots (if applicable)
17+
18+
- If applicable, add screenshots to help visualize the changes.
19+
20+
## How to Test
21+
22+
- Steps to test the changes:
23+
24+
1. Go to '...'
25+
2. Click on '....'
26+
3. Observe '....'
27+
28+
## Checklist
29+
30+
- [ ] My code follows the project's coding style.
31+
- [ ] I have performed a self-review of my code.
32+
- [ ] I have added necessary tests (if applicable).
33+
- [ ] I have documented my changes (if necessary).
34+
35+
## Additional Context
36+
37+
- Add any other relevant context or notes for reviewers.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Scan Devcontainer Image
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request: null
9+
10+
permissions: {}
11+
12+
jobs:
13+
scan-devcontainer:
14+
name: Scan Devcontainer Image
15+
16+
permissions:
17+
actions: read
18+
security-events: write
19+
20+
uses: Vianpyro/Template/.github/workflows/docker-image-verification.yml@main
21+
with:
22+
image_name: devcontainer
23+
dockerfile_path: ./Dockerfile
24+
context: .devcontainer

.github/workflows/super-linter.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Lint
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request: null
9+
10+
permissions: {}
11+
12+
jobs:
13+
build:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
contents: read
19+
packages: read
20+
statuses: write
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Super-linter
29+
uses: super-linter/super-linter@v7
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
VALIDATE_ALL_CODEBASE: false
33+
FILTER_REGEX_EXCLUDE: '(.devcontainer/Dockerfile|.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
config/sasl_passwd
2+
config/sasl_passwd.db
3+
.env

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CODEOWNERS

.prettierrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 4,
4+
"trailingComma": "es5",
5+
"useTabs": false,
6+
"semi": false,
7+
"singleQuote": true,
8+
"overrides": [
9+
{
10+
"files": ["*.yml", "*.yaml", "*.md"],
11+
"options": {
12+
"tabWidth": 2
13+
}
14+
}
15+
]
16+
}

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true,
4+
"editor.insertSpaces": true,
5+
"editor.tabSize": 4,
6+
"files.insertFinalNewline": true,
7+
"files.trimFinalNewlines": true,
8+
"files.trimTrailingWhitespace": false,
9+
"[yaml]": {
10+
"editor.tabSize": 2
11+
}
12+
}

0 commit comments

Comments
 (0)