Skip to content

Commit 5fbb4fe

Browse files
committed
public release + docker
1 parent 4a70791 commit 5fbb4fe

70 files changed

Lines changed: 1425 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.git
2+
.github
3+
*.db
4+
*.db-shm
5+
*.db-wal
6+
*.key
7+
.env
8+
/parcelwatch
9+
/parcelwatch.exe
10+
Dockerfile
11+
.dockerignore
12+
README.md
13+
LICENSE
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Bug report
2+
description: Report a problem with Parcelwatch
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to file a bug. Please do not include API
9+
credentials, tracking numbers, or other secrets in this report.
10+
11+
Security vulnerabilities should not be reported here. See the
12+
[security policy](../blob/master/SECURITY.md) instead.
13+
- type: checkboxes
14+
id: preflight
15+
attributes:
16+
label: Preflight checks
17+
options:
18+
- label: I searched existing issues and did not find a duplicate.
19+
required: true
20+
- label: This is not a security vulnerability.
21+
required: true
22+
- label: I removed any credentials, tracking numbers, and personal data from this report.
23+
required: true
24+
- type: input
25+
id: version
26+
attributes:
27+
label: Version
28+
description: The image tag or version shown in the footer.
29+
placeholder: v0.1.0
30+
validations:
31+
required: true
32+
- type: dropdown
33+
id: deployment
34+
attributes:
35+
label: How are you running it?
36+
options:
37+
- Published image (ghcr.io)
38+
- Image built from source
39+
- Other
40+
validations:
41+
required: true
42+
- type: dropdown
43+
id: carrier
44+
attributes:
45+
label: Carrier involved
46+
description: Leave as "Not carrier-specific" if the issue is unrelated to a carrier.
47+
options:
48+
- Not carrier-specific
49+
- USPS
50+
- UPS
51+
- FedEx
52+
- Royal Mail
53+
- DHL
54+
- PostNL
55+
validations:
56+
required: true
57+
- type: textarea
58+
id: what-happened
59+
attributes:
60+
label: What happened?
61+
description: A clear description of the bug and its impact.
62+
validations:
63+
required: true
64+
- type: textarea
65+
id: steps
66+
attributes:
67+
label: Steps to reproduce
68+
placeholder: |
69+
1. Go to ...
70+
2. Click ...
71+
3. See error
72+
validations:
73+
required: true
74+
- type: textarea
75+
id: expected
76+
attributes:
77+
label: Expected behavior
78+
validations:
79+
required: true
80+
- type: textarea
81+
id: logs
82+
attributes:
83+
label: Relevant logs
84+
description: Paste container logs if available. Redact anything sensitive first.
85+
render: text
86+
validations:
87+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Report a security vulnerability
4+
url: https://github.com/thatdeercodes/parcelwatch/security/advisories/new
5+
about: Please report security issues privately through a GitHub security advisory.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Feature request
2+
description: Suggest an idea or improvement for Parcelwatch
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for the suggestion. Please check existing issues first to avoid
9+
duplicates.
10+
- type: checkboxes
11+
id: preflight
12+
attributes:
13+
label: Preflight checks
14+
options:
15+
- label: I searched existing issues and did not find a duplicate.
16+
required: true
17+
- type: textarea
18+
id: problem
19+
attributes:
20+
label: Problem
21+
description: What are you trying to do, and what gets in the way?
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: proposal
26+
attributes:
27+
label: Proposed solution
28+
description: Describe what you would like to happen.
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: alternatives
33+
attributes:
34+
label: Alternatives considered
35+
validations:
36+
required: false
37+
- type: textarea
38+
id: context
39+
attributes:
40+
label: Additional context
41+
description: Carriers, deployment details, mockups, or anything else that helps.
42+
validations:
43+
required: false

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: "1.25"
21+
cache: true
22+
23+
- name: Check formatting
24+
run: |
25+
fmt=$(gofmt -l .)
26+
if [ -n "$fmt" ]; then
27+
echo "These files are not gofmt-clean:"
28+
echo "$fmt"
29+
exit 1
30+
fi
31+
32+
- name: Vet
33+
run: go vet ./...
34+
35+
- name: Build
36+
run: go build ./...
37+
38+
- name: Test
39+
run: go test ./...

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
11+
jobs:
12+
docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Log in to GitHub Container Registry
18+
uses: docker/login-action@v3
19+
with:
20+
registry: ghcr.io
21+
username: ${{ github.actor }}
22+
password: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Container metadata
25+
id: meta
26+
uses: docker/metadata-action@v5
27+
with:
28+
images: ghcr.io/${{ github.repository }}
29+
tags: |
30+
type=semver,pattern={{version}}
31+
type=semver,pattern={{major}}.{{minor}}
32+
type=raw,value=latest
33+
34+
- name: Set up Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Build and push
38+
uses: docker/build-push-action@v6
39+
with:
40+
context: .
41+
push: true
42+
platforms: linux/amd64,linux/arm64
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
build-args: |
46+
VERSION=${{ github.ref_name }}

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - 2026-06-19
11+
12+
Initial public release.
13+
14+
### Added
15+
16+
- Multi-user accounts with sessions, CSRF protection, and login rate limiting.
17+
- Per-user dashboard with live status refresh and per-package detail pages.
18+
- Background poller that detects status changes and triggers notifications.
19+
- Notifications through ntfy and email (SMTP).
20+
- Carrier support for USPS, UPS, FedEx, Royal Mail, DHL, and PostNL.
21+
- Opt-in route history with a self-hosted map and optional delivery photos.
22+
- Encryption at rest for credentials, tracking numbers, route history, and photos.
23+
- Admin controls for registration, carrier credentials, SMTP, the map, and updates.
24+
- Opt-in update checks against GitHub releases.
25+
- Container image published to the GitHub Container Registry.
26+
27+
[Unreleased]: https://github.com/thatdeercodes/parcelwatch/compare/v0.1.0...HEAD
28+
[0.1.0]: https://github.com/thatdeercodes/parcelwatch/releases/tag/v0.1.0

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM golang:1.25-alpine AS build
4+
WORKDIR /src
5+
6+
COPY go.mod go.sum ./
7+
RUN go mod download
8+
9+
COPY . .
10+
11+
ARG VERSION=dev
12+
RUN CGO_ENABLED=0 go build \
13+
-trimpath \
14+
-ldflags "-s -w -X github.com/thatdeercodes/parcelwatch/internal/version.Version=${VERSION}" \
15+
-o /parcelwatch ./cmd/parcelwatch \
16+
&& mkdir -p /data
17+
18+
FROM gcr.io/distroless/static-debian12:nonroot
19+
20+
COPY --from=build /parcelwatch /parcelwatch
21+
COPY --from=build --chown=65532:65532 /data /data
22+
23+
ENV PARCELWATCH_ADDR=":8080" \
24+
PARCELWATCH_DB="/data/parcelwatch.db"
25+
26+
EXPOSE 8080
27+
VOLUME ["/data"]
28+
29+
USER nonroot:nonroot
30+
ENTRYPOINT ["/parcelwatch"]

0 commit comments

Comments
 (0)