Skip to content

Feature: docker support#10

Open
Bound3R wants to merge 4 commits intoSnowingFox:masterfrom
Bound3R:feature/docker-support
Open

Feature: docker support#10
Bound3R wants to merge 4 commits intoSnowingFox:masterfrom
Bound3R:feature/docker-support

Conversation

@Bound3R
Copy link
Copy Markdown
Contributor

@Bound3R Bound3R commented Oct 24, 2025

This PR adds full Docker support to open-nof1.ai for easier local setup and development.

Changes

  • Added .dockerignore
  • Added Dockerfile for the main Next.js app
  • Added Dockerfile.cron for cron worker
  • Updated docker-compose.yml with services:
    • db (PostgreSQL 16)
    • app (Next.js + Bun)
    • cron (scheduled jobs)
  • Updated crontab for cron container
  • Updated README.md with Docker usage instructions

Motivation

Running the stack locally with Bun and Postgres required multiple manual steps.
With Docker Compose, the entire environment (app, DB, and cron) can be started with one command.

How to test

  1. Create a .env file with required variables.
  2. Run:
    docker compose up --build -d
  3. Access the app at http://localhost:3000.
  4. (Optional) Start only the cron worker:
    docker compose up -d cron

@Bound3R
Copy link
Copy Markdown
Contributor Author

Bound3R commented Oct 24, 2025

⚠️ I found a small bug in the cron endpoint:
POST /api/cron/20-seconds-metrics-interval returns 405 in about 1064ms.
The route only accepts GET requests, as defined in the handler:

export const GET = async (request: NextRequest) => { ... }

It can likely be fixed by adjusting the cron job to use GET instead of POST.

The README might also need to be updated to reflect this.

@Bound3R
Copy link
Copy Markdown
Contributor Author

Bound3R commented Oct 24, 2025

⚠️ I found a small bug in the cron endpoint: POST /api/cron/20-seconds-metrics-interval returns 405 in about 1064ms. The route only accepts GET requests, as defined in the handler:

export const GET = async (request: NextRequest) => { ... }

It can likely be fixed by adjusting the cron job to use GET instead of POST.

The README might also need to be updated to reflect this.

Fixed in the Docker cron setup, but I think we should update the README as well.

@Bound3R Bound3R force-pushed the feature/docker-support branch from 183864f to 294d6ca Compare October 24, 2025 21:54
@Bound3R Bound3R force-pushed the feature/docker-support branch from 294d6ca to c6e471b Compare October 24, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants