2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00
v_1
2026-09-13 20:18:51 +01:00

Martinhal Contact Management System - Docker Setup

Prerequisites

Quick Start with Docker

  1. Make sure you have all files in the same directory:
martinhal-contacts/
├── Dockerfile
├── docker-compose.yml
├── .dockerignore
├── index.html
├── credentials.json
├── server.js
├── package.json
└── contacts_data.json (will be created automatically)
  1. Build and start the container:
docker-compose up -d
  1. Access the application: Open your browser and go to: http://localhost:8000

  2. Stop the application:

docker-compose down
  1. View logs:
docker-compose logs -f

Docker Commands Reference

Start the application:

docker-compose up -d

Stop the application:

docker-compose down

Restart the application:

docker-compose restart

View logs:

docker-compose logs -f martinhal-contacts

Rebuild after code changes:

docker-compose down
docker-compose build
docker-compose up -d

Access container shell:

docker exec -it martinhal-contacts sh

📦 Data Persistence

Docker volumes ensure your data persists:

  • contacts_data.json - Your contact database (automatically backed up)
  • backups/ - Directory for backup files

Even if you delete and recreate containers, your data remains safe!

🔄 Updating the Application

  1. Update your files (index.html, server.js, etc.)
  2. Rebuild and restart:
docker-compose down
docker-compose build
docker-compose up -d

🔐 Current Passwords

  • Frontend Password: ZaAhdf4h8k79598pHD5H3
  • Backend Username: admin
  • Backend Password: yt33PdH9WgAGR5z4SFDf6

🛠 Troubleshooting

Port 8000 already in use: Edit docker-compose.yml and change the port mapping:

ports:
  - "3000:8000"  # Access via http://localhost:3000

Container won't start:

docker-compose logs martinhal-contacts

Remove everything and start fresh:

docker-compose down
docker system prune -a
docker-compose up -d

📋 Alternative: Manual Setup (No Docker)

If you don't want to use Docker:

Step 1: Install Node.js

Download from: https://nodejs.org/

Step 2: Install Dependencies

npm install

Step 3: Start Server

npm start

Step 4: Open Browser

http://localhost:8000

🎯 Production Deployment

For production deployment with Docker:

  1. Use environment variables for sensitive data
  2. Set up HTTPS with reverse proxy (nginx)
  3. Configure automated backups
  4. Set resource limits in docker-compose.yml

Example production docker-compose.yml:

version: '3.8'
services:
  martinhal-contacts:
    build: .
    container_name: martinhal-contacts
    ports:
      - "8000:8000"
    volumes:
      - ./contacts_data.json:/app/contacts_data.json
      - ./backups:/app/backups
    restart: always
    environment:
      - NODE_ENV=production
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 512M

Benefits of Docker

  • Consistent environment - Works the same everywhere
  • Easy deployment - One command to start
  • Isolated - Doesn't interfere with other apps
  • Easy updates - Rebuild and restart
  • Data persistence - Your data is safe
  • Easy backups - Just copy the volume

That's it! Your Martinhal Contact Management System is now running in Docker! 🎉

S
Description
No description provided
Readme
70 KiB
Languages
HTML 86.2%
JavaScript 13.8%