Skip to content

linanok/linanok-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linanok Logo

Linanok Platform

Linanok Platform is a professional URL shortening application designed for organizations and companies. This repository provides prebuilt Docker images and an easy deployment process.

Quick Start

  1. Clone the repository:

    git clone https://github.com/linanok/linanok-platform.git
    cd linanok-platform
  2. Configure environment variables:

    • Copy the provided .env file and adjust the values as needed for your environment. See the Environment Variables section below for details on each variable.
  3. Start with Docker Compose:

    docker-compose up -d
  4. Create an admin user:

    docker-compose exec app php artisan make:super-admin

The application will be available at http://localhost:8000.


Environment Variables

The application is configured using a .env file in the project root. Below is a list of all supported environment variables and their purposes:

Variable Description Example / Default
APP_ENV Application environment (production, local, etc.) production
APP_KEY Application encryption key (generate with php artisan key:generate) (secret)
APP_DEBUG Enable debug mode (true or false) false
APP_TIMEZONE Default timezone UTC
OCTANE_WORKERS Number of Octane workers 8
QUEUE_WORKER_REPLICAS Number of queue worker replicas 4
TRUSTED_PROXIES Trusted proxy IPs/subnets for Docker network 172.25.0.0/16
APP_MAINTENANCE_DRIVER Maintenance mode driver file
BCRYPT_ROUNDS Bcrypt hashing rounds 12
LOG_CHANNEL Log channel stack
LOG_STACK Log stack channel single
LOG_DEPRECATIONS_CHANNEL Channel for deprecation logs null
LOG_LEVEL Log verbosity level debug
DB_CONNECTION Database connection type pgsql
DB_HOST Database host postgres
DB_PORT Database port 5432
DB_DATABASE Database name linanok
DB_USERNAME Database username postgres
DB_PASSWORD Database password postgres
SESSION_DRIVER Session driver redis
SESSION_LIFETIME Session lifetime (minutes) 120
SESSION_ENCRYPT Encrypt session data (true or false) false
SESSION_PATH Session cookie path /
SESSION_DOMAIN Session cookie domain null
FILESYSTEM_DISK Default filesystem disk local
QUEUE_CONNECTION Queue connection type database
CACHE_STORE Cache store redis
CACHE_PREFIX Cache key prefix (empty)
REDIS_CLIENT Redis client predis
REDIS_HOST Redis host redis
REDIS_PASSWORD Redis password null
REDIS_PORT Redis port 6379
REDIS_DB Redis database index 0
REDIS_CACHE_DB Redis cache database index 1
REDIS_CACHE_CONNECTION Redis cache connection name cache

Note:

  • Some variables are required for the application to function correctly (e.g., APP_KEY, database credentials).
  • Adjust values as needed for your deployment and security requirements.

Production Recommendations

To ensure a secure and reliable production deployment, consider the following best practices:

  • Set a strong, unique APP_KEY: Never use the default or example key in production. Generate a new key with php artisan key:generate.
  • Disable debug mode: Set APP_DEBUG=false to prevent sensitive information from being exposed.
  • Use secure passwords: Change all default database and Redis passwords to strong, unique values.
  • Restrict trusted proxies: Set TRUSTED_PROXIES to only include your actual proxy or Docker network range.
  • Configure backups: Regularly back up your database and Redis data volumes.
  • Use HTTPS: Deploy behind a reverse proxy or load balancer that provides SSL/TLS encryption.
  • Monitor logs and health: Set up log monitoring and use the built-in health checks for all services.
  • Resource tuning: Adjust worker counts and resource limits based on your expected load and available hardware.
  • Keep images up to date: Regularly update Docker images to receive security and performance improvements.

About

Linanok Platform: Docker Compose setup for running the Linanok URL Shortener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published