Skip to main content

Quickstart Guide

Get SociApp up and running quickly using Docker. This guide will have you managing your neighborhood association in under 5 minutes.

Prerequisites

Before you begin, ensure you have:
  • Docker and Docker Compose installed on your system
  • At least 2GB of available RAM
  • Ports 80, 3000, and 3001 available

Quick Start with Docker

1
Clone the Repository
2
First, get the SociApp source code:
3
git clone <your-repository-url>
cd sociapp
4
Configure Environment Variables
5
Create a .env file in the backend directory with your configuration:
6
cd backend
cat > .env << EOF
# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password
DB_DATABASE=sociapp

# Application Settings
PORT=3000
FRONTEND_URL=http://localhost:5173

# JWT Configuration
JWT_SECRET=your-secure-jwt-secret-key
JWT_EXPIRES_IN=24h

# Email Configuration (optional)
MAIL_HOST=smtp.example.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=your-email-password
EOF
7
Make sure to replace the placeholder values with your actual configuration, especially JWT_SECRET which should be a strong random string.
8
Build and Start the Containers
9
Use the provided Docker Compose setup to build and start all services:
10
cd ..
docker-compose up -d --build
11
This command will:
12
  • Build the NestJS backend container
  • Build the Vue.js frontend container with Nginx
  • Start both services in detached mode
  • 13
    The initial build may take a few minutes. Subsequent starts will be much faster.
    14
    Verify the Installation
    15
    Check that all containers are running:
    16
    docker ps
    
    17
    You should see two containers:
    18
  • nest-backend - Running on ports 3000 and 3001
  • vue-frontend - Running on port 80
  • 19
    Access SociApp
    20
    Open your browser and navigate to:
    21
    http://localhost
    
    22
    You should see the SociApp login page. The backend API is accessible at http://localhost:3000.

    Using the Control Script

    SociApp includes a convenient control script for managing Docker containers:
    ./docker.sh
    
    This interactive script allows you to:
    • Build & Start: Rebuild and start containers
    • Restart: Restart running containers
    • Stop: Stop containers
    • Logs: View container logs in real-time
    Select a container (frontend, backend, or both) and choose an action from the menu.

    Next Steps

    Installation Guide

    Detailed installation instructions including manual setup

    Configuration

    Configure database, email, and authentication settings

    User Management

    Learn how to manage members and permissions

    API Reference

    Explore the backend API endpoints

    Troubleshooting

    Containers Won’t Start

    Check if ports are already in use:
    lsof -i :80
    lsof -i :3000
    

    Database Connection Errors

    Ensure your database is running and credentials in .env are correct:
    docker logs nest-backend
    

    Frontend Can’t Connect to Backend

    Verify the VITE_API_URL build argument in docker-compose.yml matches your backend URL.
    If you modify the docker-compose.yml or Dockerfiles, you must rebuild the containers with docker-compose up -d --build.

    Getting Help

    If you encounter issues not covered here, check the Installation guide for more detailed setup instructions.

    Build docs developers (and LLMs) love