diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 4f69e974..00000000 --- a/.dockerignore +++ /dev/null @@ -1,13 +0,0 @@ -.git -.github -.gitignore -.npmignore -.eslintignore -.editorconfig -.travis.yml -test -node_modules -LICENSE -README.md -npm-debug.log -data/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a5993210..00000000 --- a/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM node:18-alpine - -WORKDIR /usr/server - -COPY package*.json ./ - -RUN npm ci --only=production && npm cache clean --force - -COPY . . - -EXPOSE 8000 8001 8002 - -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD node -e "require('http').get('http://localhost:8000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) }).on('error', () => process.exit(1))" - -CMD ["node", "server.js"] diff --git a/README.md b/README.md index 170e2610..cdd79a4d 100644 --- a/README.md +++ b/README.md @@ -59,38 +59,10 @@ let's start with - Add your license to `LICENSE` file but don't remove starter kit license - Start your project modifying this starter kit -## Docker Usage - -The easiest way to run this application is using Docker and Docker Compose: - -### Prerequisites - -- Docker and Docker Compose installed -- No need to install PostgreSQL or Redis locally -- Uses PostgreSQL 17 (latest stable) and Redis 8 - ### Quick Start ```bash -# Start all services (API, PostgreSQL, Redis) -docker-compose up - -# Start services in background (detached mode) -docker-compose up -d - -# Stop all services -docker-compose down - -# View logs -docker-compose logs - -# View logs for specific service -docker-compose logs api-example -docker-compose logs pg-example -docker-compose logs redis-example - -# Rebuild and start services -docker-compose up --build -d +node server ``` ### Access Points @@ -99,31 +71,6 @@ docker-compose up --build -d - **API Endpoints**: http://localhost:8001/api/ - **Load Balancer**: http://localhost:8000/ (redirects to 8002) -### Service Status - -```bash -# Check running services -docker-compose ps - -# Restart a specific service -docker-compose restart api-example -``` - -## Manual Installation (Alternative) - -If you prefer to run without Docker: - -- Before running server initialize the DB: - - First of all, make sure you have PostgreSQL installed (preferably 15.x to 17.x). - - Run database initialization script: `database/setup.sh` -- Run project: `node server.js` and stop with Ctrl+C -- Ask questions in Telegram https://t.me/nodeua (node.js related) or - https://t.me/metaserverless (metarhia related) - -## AI and agent config - -Project rules and skills live in **`.ai/`** (IDE- and platform-independent); templates and hook docs in **`docs/ai/`**. See [AGENTS.md](./AGENTS.md). **Cursor / Claude Code / Windsurf / GitHub Copilot users:** after clone run `npm run link:cursor`, `npm run link:claude`, `npm run link:windsurf`, or `npm run link:github` (or `npm run link:all`) **before** opening the project. If the IDE already created a real folder, remove it then run the same command again. For GitHub, only `.github/rules` and `.github/skills` are linked so `.github/workflows` etc. can stay in git. - ## License Copyright (c) 2020-2026 Metarhia contributors. diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index fa1a8208..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,49 +0,0 @@ -services: - api-example: - build: - context: . - dockerfile: Dockerfile - container_name: api-example - environment: - - DB_HOST=pg-example - - REDIS_HOST=redis-example - depends_on: - pg-example: - condition: service_healthy - redis-example: - condition: service_started - ports: - - "127.0.0.1:8000:8000" - - "127.0.0.1:8001:8001" - - "127.0.0.1:8002:8002" - restart: always - - pg-example: - image: postgres:17-alpine - container_name: pg-example - environment: - - POSTGRES_USER=marcus - - POSTGRES_PASSWORD=marcus - - POSTGRES_DB=application - volumes: - - postgres_data:/var/lib/postgresql/data - - ./database/seeds:/docker-entrypoint-initdb.d:ro - ports: - - "127.0.0.1:5432:5432" - healthcheck: - test: ["CMD", "pg_isready", "-U", "marcus"] - restart: always - - redis-example: - image: redis:8-alpine - container_name: redis-example - ports: - - "127.0.0.1:6379:6379" - restart: always - -volumes: - postgres_data: - -networks: - default: - name: api-example-network