Skip to content

Commit fdd3cca

Browse files
committed
docker compose default
1 parent 2f004b8 commit fdd3cca

4 files changed

Lines changed: 131 additions & 70 deletions

File tree

.env.example

Lines changed: 0 additions & 55 deletions
This file was deleted.

README.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,58 @@ Notifuse follows clean architecture principles with clear separation of concerns
8181

8282
## 🚀 Getting Started
8383

84-
For installation instructions, configuration options, and detailed setup guides, visit our comprehensive documentation at **[docs.notifuse.com](https://docs.notifuse.com)**.
84+
### Quick Start with Docker Compose
85+
86+
1. **Clone the repository**:
87+
88+
```bash
89+
git clone https://github.com/Notifuse/notifuse.git
90+
cd notifuse
91+
```
92+
93+
2. **Configure environment variables**:
94+
95+
```bash
96+
cp env.example .env
97+
# Edit .env with your configuration
98+
```
99+
100+
3. **Generate PASETO keys**:
101+
Visit [paseto.notifuse.com](https://paseto.notifuse.com) to generate your PASETO keys
102+
103+
4. **Start the services**:
104+
105+
```bash
106+
docker-compose up -d
107+
```
108+
109+
5. **Access the application**:
110+
- Console: http://localhost:8080
111+
- API: http://localhost:8080/api
112+
113+
### Environment Configuration
114+
115+
**⚠️ Important**: The included `docker-compose.yml` is designed for **testing and development only**. For production deployments:
116+
117+
- **Use a separate PostgreSQL database** (managed service recommended)
118+
- **Configure external storage** for file uploads
119+
- **Set up proper SSL/TLS termination**
120+
- **Use a reverse proxy** (nginx, Traefik, etc.)
121+
122+
#### Development Setup
123+
124+
The docker-compose includes a PostgreSQL container for quick testing. Simply run `docker-compose up -d` to get started.
125+
126+
#### Production Setup
127+
128+
Copy `env.example` to `.env` and configure:
129+
130+
- **Required**: `ROOT_EMAIL`, `API_ENDPOINT`, `PASETO_PRIVATE_KEY`, `PASETO_PUBLIC_KEY`, `SECRET_KEY`
131+
- **Database**: Configure `DB_HOST`, `DB_USER`, `DB_PASSWORD` for your external PostgreSQL
132+
- **SMTP Settings**: Configure your email provider for system emails
133+
- **SSL**: Set `DB_SSLMODE=require` for secure database connections
134+
135+
For detailed installation instructions, configuration options, and setup guides, visit **[docs.notifuse.com](https://docs.notifuse.com)**.
85136

86137
## 📚 Documentation
87138

docker-compose.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
context: .
77
dockerfile: Dockerfile
88
ports:
9-
- "8080:8080"
9+
- '8080:8080'
1010
environment:
1111
- SERVER_PORT=8080
1212
- SERVER_HOST=0.0.0.0
@@ -18,16 +18,16 @@ services:
1818
- DB_NAME=notifuse_system
1919
- DB_SSLMODE=disable
2020
- ENVIRONMENT=production
21-
- PASETO_PRIVATE_KEY=${PASETO_PRIVATE_KEY}
22-
- PASETO_PUBLIC_KEY=${PASETO_PUBLIC_KEY}
23-
- SECRET_KEY=${SECRET_KEY}
24-
- ROOT_EMAIL=${ROOT_EMAIL:your@email.com}
25-
- SMTP_HOST=smtp.example.com
26-
- SMTP_PORT=587
27-
- SMTP_USERNAME=your-username
28-
- SMTP_PASSWORD=your-password
29-
- SMTP_FROM_EMAIL=noreply@example.com
30-
- SMTP_FROM_NAME=Notifuse
21+
- PASETO_PRIVATE_KEY=${PASETO_PRIVATE_KEY:-d04zCk3Fa45oOjDWHpAvc1AZxnLdGffOnNWK+Jt2yXf37+FTfuMMHb8flcfPMqLluRR3rvhbr555r6j1DEigrA==}
22+
- PASETO_PUBLIC_KEY=${PASETO_PUBLIC_KEY:-9+/hU37jDB2/H5XHzzKi5bkUd674W6+eea+o9QxIoKw=}
23+
- SECRET_KEY=${SECRET_KEY:-change_me_32_character_secret_key}
24+
- ROOT_EMAIL=${ROOT_EMAIL:-admin@example.com}
25+
- SMTP_HOST=${SMTP_HOST:-smtp.example.com}
26+
- SMTP_PORT=${SMTP_PORT:-587}
27+
- SMTP_USERNAME=${SMTP_USERNAME:-your-username}
28+
- SMTP_PASSWORD=${SMTP_PASSWORD:-your-password}
29+
- SMTP_FROM_EMAIL=${SMTP_FROM_EMAIL:-noreply@example.com}
30+
- SMTP_FROM_NAME=${SMTP_FROM_NAME:-Notifuse}
3131
- API_ENDPOINT=${API_ENDPOINT:-https://notifuse.yourdomain.com}
3232
- TRACING_ENABLED=false
3333
- TRACING_SERVICE_NAME=notifuse
@@ -54,7 +54,7 @@ services:
5454
postgres:
5555
image: postgres:17-alpine
5656
ports:
57-
- "5432:5432"
57+
- '5432:5432'
5858
environment:
5959
- POSTGRES_USER=postgres
6060
- POSTGRES_PASSWORD=postgres
@@ -65,7 +65,7 @@ services:
6565
networks:
6666
- notifuse-network
6767
healthcheck:
68-
test: ["CMD-SHELL", "pg_isready -U postgres"]
68+
test: ['CMD-SHELL', 'pg_isready -U postgres']
6969
interval: 5s
7070
timeout: 5s
7171
retries: 5
@@ -76,4 +76,4 @@ volumes:
7676

7777
networks:
7878
notifuse-network:
79-
driver: bridge
79+
driver: bridge

env.example

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Notifuse Environment Configuration
2+
# Copy this file to .env and update the values below for your installation
3+
4+
# =============================================================================
5+
# REQUIRED VARIABLES - You must set these for production use
6+
# =============================================================================
7+
8+
# Root administrator email
9+
ROOT_EMAIL=admin@yourcompany.com
10+
11+
# Public API endpoint URL (where your Notifuse instance will be accessible)
12+
API_ENDPOINT=https://emails.yourcompany.com
13+
14+
# Database configuration (if using external PostgreSQL)
15+
# DB_HOST=your-postgres-host.com
16+
# DB_PORT=5432
17+
# DB_USER=postgres
18+
# DB_PASSWORD=your-secure-password
19+
20+
# PASETO keys for JWT tokens - Generate at https://paseto.notifuse.com
21+
PASETO_PRIVATE_KEY=your_base64_encoded_private_key_here
22+
PASETO_PUBLIC_KEY=your_base64_encoded_public_key_here
23+
24+
# Secret key for database encryption (32 characters minimum)
25+
SECRET_KEY=your_32_character_secret_key_here_123
26+
27+
# SMTP Configuration for system emails (password resets, invitations, etc.)
28+
SMTP_HOST=smtp.gmail.com
29+
SMTP_PORT=587
30+
SMTP_USERNAME=your-email@gmail.com
31+
SMTP_PASSWORD=your-app-password
32+
SMTP_FROM_EMAIL=noreply@yourcompany.com
33+
SMTP_FROM_NAME=Your Company Name
34+
35+
# =============================================================================
36+
# OPTIONAL VARIABLES - Uncomment and modify if needed
37+
# =============================================================================
38+
39+
# Server Configuration
40+
# SERVER_PORT=8080
41+
# SERVER_HOST=0.0.0.0
42+
# CORS_ALLOW_ORIGIN=*
43+
# ENVIRONMENT=production
44+
# LOG_LEVEL=info
45+
46+
# Database Configuration (for custom setups)
47+
# DB_PREFIX=notifuse
48+
# DB_NAME=notifuse_system
49+
# DB_SSLMODE=require
50+
51+
# Tracing Configuration
52+
# TRACING_ENABLED=false
53+
# TRACING_SERVICE_NAME=notifuse-api
54+
# TRACING_SAMPLING_PROBABILITY=0.1
55+
# TRACING_TRACE_EXPORTER=none
56+
# TRACING_JAEGER_ENDPOINT=http://localhost:14268/api/traces
57+
# TRACING_ZIPKIN_ENDPOINT=http://localhost:9411/api/v2/spans
58+
# TRACING_STACKDRIVER_PROJECT_ID=
59+
# TRACING_AZURE_INSTRUMENTATION_KEY=
60+
# TRACING_DATADOG_AGENT_ADDRESS=localhost:8126
61+
# TRACING_DATADOG_API_KEY=
62+
# TRACING_XRAY_REGION=us-west-2
63+
# TRACING_AGENT_ENDPOINT=localhost:8126
64+
# TRACING_METRICS_EXPORTER=none
65+
# TRACING_PROMETHEUS_PORT=9464

0 commit comments

Comments
 (0)