Sign inSign up

euaell/anchorsystems

By euaell

•Updated 5 days ago

Image
Web servers
0

1.8K

euaell/anchorsystems repository overview

⁠Anchor Systems - AI Solutions Platform

Docker image for the Anchor Systems website - a Next.js application showcasing custom AI & RAG solutions for modern businesses.

Docker Pulls Docker Image Size

⁠Quick Start

docker run -d \
  --name anchorsystems \
  -p 3000:3000 \
  -e DATABASE_URL="Host=your-host;Port=5432;Database=your-db;Username=your-user;Password=your-password" \
  euaell/anchorsystems:latest

Access the application at http://localhost:3000

⁠What's Inside

This Docker image contains:

  • Next.js 16 web application
  • Node.js 22 Alpine-based runtime
  • Production-optimized build with standalone output
  • Non-root user (nextjs:nodejs) for security
  • PostgreSQL integration for contact form submissions

⁠Configuration

⁠Required Environment Variables
VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringHost=localhost;Port=5432;Database=anchorsystems;Username=user;Password=pass
⁠Optional Environment Variables
VariableDescriptionDefault
NODE_ENVNode environmentproduction
PORTApplication port3000
HOSTNAMEServer hostname0.0.0.0
NEXT_TELEMETRY_DISABLEDDisable Next.js telemetryNot set (telemetry enabled)
⁠Database Connection String Format

The DATABASE_URL follows the Npgsql connection string format:

Host=hostname;Port=5432;Database=dbname;Username=user;Password=pass;Pooling=true;Minimum Pool Size=0;Maximum Pool Size=1024;Timeout=15;CommandTimeout=30;Ssl Mode=Prefer;Trust Server Certificate=true;

⁠Exposed Ports

PortDescription
3000HTTP web server (Next.js)

⁠Usage Examples

⁠Basic Docker Run
docker run -d \
  --name anchorsystems \
  -p 3000:3000 \
  -e DATABASE_URL="Host=postgres;Port=5432;Database=anchorsystems;Username=myuser;Password=mypass" \
  euaell/anchorsystems:latest
⁠With Custom Port
docker run -d \
  --name anchorsystems \
  -p 8080:3000 \
  -e DATABASE_URL="Host=postgres;Port=5432;Database=anchorsystems;Username=myuser;Password=mypass" \
  euaell/anchorsystems:latest

Access at http://localhost:8080

⁠With Telemetry Disabled
docker run -d \
  --name anchorsystems \
  -p 3000:3000 \
  -e DATABASE_URL="Host=postgres;Port=5432;Database=anchorsystems;Username=myuser;Password=mypass" \
  -e NEXT_TELEMETRY_DISABLED=1 \
  euaell/anchorsystems:latest

Create a docker-compose.yml file:

version: '3.8'

services:
  app:
    image: euaell/anchorsystems:latest
    container_name: anchorsystems
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=Host=postgres;Port=5432;Database=anchorsystems;Username=myuser;Password=mypass;Pooling=true;Minimum Pool Size=0;Maximum Pool Size=1024;
    depends_on:
      postgres:
        condition: service_healthy
    restart: unless-stopped

  postgres:
    image: postgres:16-alpine
    container_name: anchorsystems_db
    environment:
      - POSTGRES_USER=myuser
      - POSTGRES_PASSWORD=mypass
      - POSTGRES_DB=anchorsystems
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U myuser -d anchorsystems"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

volumes:
  postgres_data:

Then run:

docker-compose up -d

⁠Database Setup

The application requires a PostgreSQL database with the following schema:

CREATE TABLE contact_submissions (
    id SERIAL PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) NOT NULL,
    company VARCHAR(255),
    phone VARCHAR(50),
    message TEXT NOT NULL,
    service_interest VARCHAR(100),
    created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);

To initialize the database:

  1. Connect to your PostgreSQL instance
  2. Create the database: CREATE DATABASE anchorsystems;
  3. Run the schema creation SQL above

Or use the provided schema file from the repository:

psql -h your-host -U your-user -d anchorsystems -f database/schema.sql

⁠Building from Source

⁠Clone the Repository
git clone https://github.com/Euaell/anchorsystems.git
cd anchorsystems
⁠Build the Docker Image
docker build -t euaell/anchorsystems:latest .
⁠Run Your Custom Build
docker run -d \
  --name anchorsystems \
  -p 3000:3000 \
  -e DATABASE_URL="your-connection-string" \
  euaell/anchorsystems:latest

⁠Technology Stack

  • Framework: Next.js 16.0.5
  • Runtime: Node.js 22 (Alpine Linux)
  • UI Library: React 19.2.0
  • Styling: Tailwind CSS 4.1.17
  • Database: PostgreSQL with pg driver
  • Build Type: Standalone (optimized for Docker)

⁠Image Details

  • Base Image: node:22-alpine
  • User: nextjs (UID: 1001, GID: 1001)
  • Working Directory: /app
  • Entrypoint: node server.js
  • Build Type: Multi-stage (deps → builder → runner)

⁠Health Check

You can add a health check to your deployment:

healthcheck:
  test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/"]
  interval: 30s
  timeout: 10s
  retries: 3
  start_period: 40s

Or with Docker run:

docker run -d \
  --name anchorsystems \
  --health-cmd="wget --quiet --tries=1 --spider http://localhost:3000/ || exit 1" \
  --health-interval=30s \
  --health-timeout=10s \
  --health-retries=3 \
  -p 3000:3000 \
  -e DATABASE_URL="your-connection-string" \
  euaell/anchorsystems:latest

⁠Troubleshooting

⁠Container Won't Start

Check logs:

docker logs anchorsystems

Common issues:

  • Missing DATABASE_URL environment variable
  • Invalid database connection string format
  • Database server not accessible from container
⁠Database Connection Errors

Verify connection:

docker exec -it anchorsystems node -e "console.log(process.env.DATABASE_URL)"

Check network:

  • Ensure PostgreSQL allows connections from Docker network
  • If using Docker Compose, use service name (e.g., postgres) as host
  • Check PostgreSQL pg_hba.conf for connection permissions
⁠Port Already in Use

Change the host port mapping:

docker run -d -p 8080:3000 ... euaell/anchorsystems:latest
⁠Permission Denied Errors

The application runs as non-root user nextjs. Ensure any mounted volumes have proper permissions:

chown -R 1001:1001 /path/to/volume
⁠Out of Memory

Increase Docker memory limit:

docker run -d --memory="2g" ... euaell/anchorsystems:latest

⁠Production Deployment

docker run -d \
  --name anchorsystems \
  --restart unless-stopped \
  --memory="1g" \
  --cpus="1.0" \
  --health-cmd="wget --quiet --tries=1 --spider http://localhost:3000/ || exit 1" \
  --health-interval=30s \
  -p 3000:3000 \
  -e DATABASE_URL="your-secure-connection-string" \
  -e NODE_ENV=production \
  -e NEXT_TELEMETRY_DISABLED=1 \
  euaell/anchorsystems:latest
⁠Security Considerations
  • Use secrets management for DATABASE_URL (Docker Swarm secrets, Kubernetes secrets, etc.)
  • Run behind a reverse proxy (nginx, Traefik) for HTTPS
  • Use strong, unique database passwords
  • Enable SSL/TLS for PostgreSQL connections
  • Keep the image updated with docker pull euaell/anchorsystems:latest

⁠Support & Resources

⁠License

Copyright © 2025 Anchor Systems. All rights reserved.

⁠Tags

  • latest - Latest stable release

Built with ❤️ for AI & RAG Solutions

Tag summary

Content type

Image

Digest

sha256:3294de0a1…

Size

75 MB

Last updated

5 days ago

docker pull euaell/anchorsystems