Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Gmail Configuration for email service
# Enable 2-factor authentication and generate an app password
GMAIL_ACCOUNT=your-email@gmail.com
GMAIL_APP_KEY=your-app-password

# Redis password for caching
REDIS_PASSWORD=redispassword

# Application Configuration
NOTIFICATIONS_ENABLED=true
AUTH_JWT_SECRET=my-secret-key-change-in-production
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ build/

### VS Code ###
.vscode/

.env
36 changes: 36 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '3.8'

services:
# Redis service for caching
redis:
image: redis:7-alpine
container_name: blog-redis
ports:
- "6380:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}
command: redis-server --requirepass ${REDIS_PASSWORD:-redispassword}
volumes:
- redis_data:/data

# Main Spring Boot application
blog-backend:
build:
context: .
dockerfile: Dockerfile
container_name: blog-backend
ports:
- "8080:8080"
environment:
- GMAIL_ACCOUNT=${GMAIL_ACCOUNT:-your-email@gmail.com}
- GMAIL_APP_KEY=${GMAIL_APP_KEY:-your-app-password}
- REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}
- NOTIFICATIONS_ENABLED=${NOTIFICATIONS_ENABLED:-true}
- AUTH_JWT_SECRET=${AUTH_JWT_SECRET:-my-secret-key}
depends_on:
- redis
volumes:
- ./logs:/app/logs

volumes:
redis_data: