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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ We offer a hosted version of Inbox Zero at [https://getinboxzero.com](https://ge

The easiest way to self-host Inbox Zero is using our pre-built Docker image.

See our **[Docker Self-Hosting Guide](docs/hosting/docker.md)** for complete instructions.
See our **[Self-Hosting Guide](docs/hosting/self-hosting.md)** for complete instructions.

### Local Development Setup

Expand Down Expand Up @@ -303,7 +303,7 @@ To build and run the full stack (App + DB + Redis) locally in production mode us
NEXT_PUBLIC_BASE_URL=http://localhost:3000 docker compose --profile all up --build
```

For production deployments with external databases, see the [Docker Self-Hosting Guide](docs/hosting/docker.md).
For production deployments with external databases, see the [Self-Hosting Guide](docs/hosting/self-hosting.md).

To run without Docker (local production build):

Expand Down Expand Up @@ -376,7 +376,7 @@ For detailed instructions on:
- Production configuration

See our comprehensive guides:
- [Docker Self-Hosting Guide](docs/hosting/docker.md)
- [Self-Hosting Guide](docs/hosting/self-hosting.md)
- [AWS EC2 Deployment Guide](docs/hosting/ec2-deployment.md)
- [AWS Copilot Deployment Guide](docs/hosting/aws-copilot.md)

Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,26 @@ services:
UPSTASH_REDIS_URL: ${UPSTASH_REDIS_URL:-http://serverless-redis-http:80}
restart: always

cron:
image: alpine:latest
command: >
sh -c "
apk add --no-cache curl &&
while true; do
echo \"[cron] Renewing email watches...\" &&
curl -s -X GET 'http://web:3000/api/watch/all' -H \"Authorization: Bearer $${CRON_SECRET}\" &&
echo \"[cron] Done. Sleeping for 6 hours...\" &&
sleep 21600
done
"
env_file:
- ./apps/web/.env
depends_on:
- web
networks:
- inbox-zero-network
restart: always

volumes:
database-data:

Expand Down
2 changes: 1 addition & 1 deletion docs/hosting/aws-copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,5 @@ If migrations fail:

- [AWS Copilot Documentation](https://aws.github.io/copilot-cli/docs/)
- [Copilot Manifest Reference](https://aws.github.io/copilot-cli/docs/manifest/overview/)
- [Docker Self-Hosting Guide](./docker.md) - For local Docker setup
- [Self-Hosting Guide](./self-hosting.md) - For local Docker setup

2 changes: 1 addition & 1 deletion docs/hosting/ec2-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ You can also use nginx or any approach of your choice.

## 4. Deployment

Once your EC2 instance is set up with Docker, swap memory, and HTTPS, follow the deployment steps in the [Docker deployment guide](./docker.md).
Once your EC2 instance is set up with Docker, swap memory, and HTTPS, follow the deployment steps in the [Self-Hosting Guide](./self-hosting.md).
12 changes: 12 additions & 0 deletions docs/hosting/docker.md → docs/hosting/self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ docker compose logs -f web
docker compose logs -f db
```

## Scheduled Tasks

Gmail and Outlook push notification subscriptions expire periodically and must be renewed. The Docker Compose setup includes a `cron` container that handles this automatically.

**If you're not using Docker Compose** (e.g., running directly, Kubernetes, etc.), you need to set up a cron job to call the watch renewal endpoint every 6 hours:

```bash
0 */6 * * * curl -s -X GET "https://yourdomain.com/api/watch/all" -H "Authorization: Bearer YOUR_CRON_SECRET"
```

Replace `YOUR_CRON_SECRET` with the value of `CRON_SECRET` from your `.env` file.

## Building from Source (Optional)

If you prefer to build the image yourself instead of using the pre-built one:
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.20.28
v2.20.29
Loading