Getting Started with Ulinda

Deploy Ulinda using Docker Compose in just a few simple steps. This guide will walk you through the entire process.

Prerequisites

Before you begin, ensure you have the following installed on your system:

You can verify your installations by running:

docker --version docker compose version

Step-by-Step Setup

1Create Project Directory

Create a new directory for your Ulinda deployment and navigate into it:

mkdir ulinda cd ulinda

2Create Docker Compose File

Create a file named docker-compose.yml with the following contents:

services: postgres: image: postgres:17 container_name: ulinda-postgres environment: POSTGRES_DB: ${POSTGRES_DB:-ulinda} POSTGRES_USER: ${POSTGRES_USER:-ulinda_user} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ulinda_password} volumes: - postgres_data:/var/lib/postgresql/data networks: - ulinda-network backend: image: ulinda/ulinda-backend:latest container_name: ulinda-backend environment: SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB:-ulinda} SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER:-ulinda_user} SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD:-ulinda_password} SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-dev} ULINDA_ADMIN_PASSWORD: ${ULINDA_ADMIN_PASSWORD:-admin} CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-http://localhost:3000} # Cookie security settings - set to true/Strict when using HTTPS in production ULINDA_COOKIE_SECURE: ${ULINDA_COOKIE_SECURE:-false} ULINDA_COOKIE_SAMESITE: ${ULINDA_COOKIE_SAMESITE:-Lax} ports: - "127.0.0.1:${BACKEND_PORT:-8081}:8081" depends_on: - postgres networks: - ulinda-network frontend: image: ulinda/ulinda-frontend:latest container_name: ulinda-frontend ports: - "127.0.0.1:${FRONTEND_PORT:-3000}:80" depends_on: - backend networks: - ulinda-network volumes: postgres_data: networks: ulinda-network: driver: bridge

3Create Environment File (Optional)

Create a .env file to customize your configuration:

# Database Configuration POSTGRES_DB=ulinda POSTGRES_USER=ulinda_user POSTGRES_PASSWORD=your_secure_password # Application Configuration SPRING_PROFILES_ACTIVE=dev ULINDA_ADMIN_PASSWORD=your_admin_password # Port Configuration BACKEND_PORT=8081 FRONTEND_PORT=3000 # CORS Configuration CORS_ALLOWED_ORIGINS=http://localhost:3000 # Cookie Security Configuration (for production with HTTPS) # ULINDA_COOKIE_SECURE=true # ULINDA_COOKIE_SAMESITE=Strict
Note: If you don't create a .env file, the default values shown in the docker-compose.yml will be used.

4Pull Docker Images

Download the latest Ulinda images from Docker Hub:

docker compose pull

5Start the Application

Launch all services in detached mode:

docker compose up -d

This command will:

  • Start the PostgreSQL database
  • Initialize the backend Spring Boot application
  • Launch the frontend web server
  • Create the necessary network and volumes

6Verify Services Are Running

Check that all containers are up and running:

docker compose ps

You should see three containers with "Up" status:

  • ulinda-postgres
  • ulinda-backend
  • ulinda-frontend

7Access Ulinda

Open your web browser and navigate to:

http://localhost:3000

Default login credentials:

  • Username: admin
  • Password: admin (or the password you set in ULINDA_ADMIN_PASSWORD)

Useful Commands

View Logs

View logs from all services:

docker compose logs -f

View logs from a specific service:

docker compose logs -f backend docker compose logs -f frontend docker compose logs -f postgres

Stop Services

Stop all services (keeps data):

docker compose stop

Restart Services

Restart all services:

docker compose restart

Stop and Remove Containers

Stop and remove all containers (keeps data in volumes):

docker compose down

Remove Everything (Including Data)

Stop and remove containers, networks, and volumes:

docker compose down -v
Warning: This will delete all data in the database!

Update to Latest Version

Pull new images and restart services:

docker compose pull docker compose up -d

Troubleshooting

Port Already in Use

If you see an error about ports already being in use, change the ports in your .env file:

BACKEND_PORT=8082 FRONTEND_PORT=3001

Database Connection Issues

If the backend can't connect to the database, check the logs:

docker compose logs postgres docker compose logs backend

Ensure the PostgreSQL container is fully started before the backend attempts to connect.

Permission Denied Errors

On Linux, if you encounter permission issues with volumes, you may need to check Docker permissions or run with appropriate user permissions.

Container Won't Start

Check the status of all containers:

docker compose ps docker compose logs

Try restarting from scratch:

docker compose down docker compose up -d

Next Steps

Now that Ulinda is running, you can: