You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Install linter: `curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.7.2` -- takes 30-60 seconds. Current system has v2.7.2.
26
26
27
27
### Testing and Validation
28
28
- Run tests: `make test` -- takes 2-3 minutes. NEVER CANCEL. Set timeout to 300+ seconds.
@@ -51,17 +51,39 @@ The application will start on port 8080. Access at http://localhost:8080
51
51
docker stop vault-dev && docker rm vault-dev
52
52
```
53
53
54
-
### Docker Build Issues
55
-
**IMPORTANT**: Docker builds currently fail in CI/containerized environments due to certificate verification issues with Go proxy:
56
-
```
57
-
go: cloud.google.com/go@v0.112.1: Get "https://proxy.golang.org/...": tls: failed to verify certificate: x509: certificate signed by unknown authority
54
+
### Docker Build and Deployment
55
+
The project includes comprehensive Docker support:
56
+
57
+
#### Local Development with Docker Compose
58
+
```bash
59
+
# Start full stack (Vault + App on port 8082)
60
+
make run
61
+
# or
62
+
docker compose -f deploy/docker-compose.yml up --build -d
63
+
64
+
# View logs
65
+
make logs
66
+
67
+
# Stop services
68
+
make stop
69
+
70
+
# Clean up
71
+
make clean
58
72
```
59
73
60
-
Do NOT attempt Docker builds (`make build`, `make image`, `docker compose up --build`) in sandboxed environments. These commands will fail after 15-30 seconds. Use local Go builds instead.
74
+
The default `docker-compose.yml` runs the app on port 8082 (HTTP) with Vault using token `supersecret`.
75
+
76
+
#### Production Docker Image
77
+
```bash
78
+
# Build multi-platform image with attestations
79
+
make image
80
+
# Builds for linux/amd64 and linux/arm64 with SBOM and provenance
61
81
62
-
If you need to test Docker functionality, run individual commands:
63
-
-`make build` -- WILL FAIL in CI. Takes 15-30 seconds to fail.
64
-
-`make image` -- WILL FAIL in CI. Takes 15-30 seconds to fail.
82
+
# Alternative: Build local image only
83
+
docker compose -f deploy/docker-compose.yml build
84
+
```
85
+
86
+
**Note**: In some CI/containerized environments, Docker builds may encounter certificate verification issues with Go proxy. If this occurs, use local Go builds instead.
65
87
66
88
## Validation
67
89
@@ -100,6 +122,16 @@ Always run these commands before committing:
100
122
101
123
## Common Tasks
102
124
125
+
### Key Application Features
126
+
-**Self-Destructing Messages**: Messages are automatically deleted after first read
127
+
-**Vault Backend**: Uses HashiCorp Vault's cubbyhole for secure temporary storage
128
+
-**TTL Support**: Configurable time-to-live (default 48h, max 168h/7 days)
129
+
-**File Upload**: Support for file uploads with base64 encoding (max 50MB)
130
+
-**One-Time Tokens**: Vault tokens with exactly 2 uses (1 to create, 1 to read)
131
+
-**Rate Limiting**: 10 requests per second to prevent abuse
132
+
-**TLS Support**: Auto TLS via Let's Encrypt or manual certificate configuration
133
+
-**No External Dependencies**: All JavaScript/fonts self-hosted for privacy
134
+
103
135
### Configuration Environment Variables
104
136
-`VAULT_ADDR`: Vault server address (e.g., `http://localhost:8200`)
105
137
-`VAULT_TOKEN`: Vault authentication token (e.g., `supersecret` for dev)
@@ -114,22 +146,45 @@ Always run these commands before committing:
114
146
### Repository Structure
115
147
```
116
148
.
117
-
├── cmd/sup3rS3cretMes5age/main.go # Application entry point
149
+
├── cmd/sup3rS3cretMes5age/
150
+
│ └── main.go # Application entry point (23 lines)
0 commit comments