This document describes the appliku.yml file format and usage of application config in Appliku.

YML format specification and explanation

The appliku.yml file is a YAML configuration file that defines how your application should be built, deployed, and configured in Appliku. This file should be placed in the root directory of your application repository.

To verify the configuration go to the application settings page, "YAML Config tab".

You can specify a different file for configuration, which is convenient for production/non-production environments running different sets of commands.

Example in SpeedPy Boilerplate

You can check out an example in our boilerplate, SpeedPy.com: appliku.yml

Root Level Structure

The configuration file contains the following top-level sections:

  • build_settings - Application build configuration
  • services - Application processes/services
  • databases - Database services
  • volumes - Persistent storage volumes
  • cronjobs - Scheduled tasks

Build Settings

The build_settings section configures how your application is built and prepared for deployment.

Required Fields

  • build_image (string) - The buildpack or runtime environment to use

Optional Fields

  • build_command (string) - Command to run during the build phase
  • dockerfile (string) - Custom Dockerfile content (when using dockerfile or custom build_image)
  • dockerfile_path (string) - Path to Dockerfile in repository (default: "Dockerfile")
  • dockerfile_context_path (string) - Build context path for Dockerfile
  • container_port (integer) - Port your application listens on inside the container
  • skip_release_command (boolean) - Skip running release command after deployment (default: false)
  • expose_web_port (boolean) - Expose container port on all interfaces (default: false)
  • is_static_site (boolean) - Mark application as static site (default: false)
  • output_directory (string) - Directory containing built static files
  • environment_variables (array) - Environment variables for the application

Available Build Images

Python Runtimes: - python-3.13 - Python 3.13 - python-3.12 - Python 3.12 - python-3.11 - Python 3.11 - python-3.10 - Python 3.10

Python + Node.js Runtimes: - python-3.13-node-20.18 - Python 3.13 + Node.js 20.18 - python-3.12-node-20.10 - Python 3.12 + Node.js 20.10 - python-3.11-node-20.10 - Python 3.11 + Node.js 20.10 - python-3.10-node-20.10 - Python 3.10 + Node.js 20.10

Ruby Runtimes: - ruby-3.4.1 - Ruby 3.4.1 - ruby-3.3-rails - Ruby 3.3 with Rails

Node.js Runtimes: - node-20-npm - Node.js 20 with NPM - node-20-yarn - Node.js 20 with Yarn - node-14 - Node.js 14

Alternative Runtimes: - pypy2 - PyPy2 - pypy3 - PyPy3 - dockerfile - Use Dockerfile from codebase - custom - Custom Dockerfile

Read more about Custom Dockerfile in Appliku

Environment Variables

Environment variables can be configured in three ways:

  1. Static Value:
environment_variables:
  - name: MY_ENV_VAR
    value: my_value
  1. From Database:
environment_variables:
  - name: DATABASE_URL
    from_database:
      name: db
      property: connection_url
  1. Manual Configuration:

This feature is still work in progress. Specifying variables with source: manual in future will prompt user to fill in these environment variables during application creation process.

environment_variables:
  - name: OPENAI_API_KEY
    source: manual

Services

The services section defines the processes that run your application. Each service is a key-value pair where the key is the service name and the value contains the service configuration.

Service Configuration Fields

  • command (string) - Command to run the service (can be empty or null)
  • scale (integer) - Number of instances to run (default: 1)
  • mode (string) - Service mode for cluster deployments (default: "replicated")
  • placement_constraints (string) - Docker Swarm placement constraints
  • resources_limits_memory (string) - Memory limits (e.g., "512M", "2G")
  • resources_limits_cpus (string) - CPU limits (e.g., "0.5", "2")
  • resources_reservations_memory (string) - Memory reservations (e.g., "256M", "1G")
  • resources_reservations_cpus (string) - CPU reservations (e.g., "0.25", "1")

Service Modes

  • replicated - Run specified number of instances
  • global - Run one instance on each node

Example Services

services:
  web:
    command: gunicorn project.wsgi --log-file -
    scale: 1
    mode: replicated
    placement_constraints: |
      node.role == manager
    resources_limits_memory: 512M
    resources_limits_cpus: "0.5"
    resources_reservations_memory: 256M
    resources_reservations_cpus: "0.25"

  worker:
    command: celery -A project worker -l info
    scale: 2
    mode: replicated
    placement_constraints: |
      node.role == worker
    resources_limits_memory: 512M
    resources_limits_cpus: "0.5"

  release:
    command: bash release.sh

Databases

The databases section defines database services that will be provisioned for your application. Each database is a key-value pair where the key is the database name and the value contains the database configuration.

Database Configuration Fields

  • type (string, required) - Database type to provision

Available Database Types

PostgreSQL: - postgresql_17 - PostgreSQL 17 - postgresql_16 - PostgreSQL 16 - postgresql_15 - PostgreSQL 15 - postgresql_12 - PostgreSQL 12

PostgreSQL Extensions: - postgis_16_34 - PostgreSQL 16 with PostGIS 3.4 - postgresql_16_pgvector - PostgreSQL 16 with pgvector - postgis - PostgreSQL with PostGIS - timescale_db_15 - TimescaleDB 15

Other Databases: - mysql_8 - MySQL 8 - redis_7 - Redis 7 - redis_6 - Redis 6 - rabbitmq - RabbitMQ - elasticsearch_8_17 - Elasticsearch 8.17

Example Databases

databases:
  db:
    type: postgresql_17
  redis:
    type: redis_7
  elasticsearch:
    type: elasticsearch_8_17

Volumes

The volumes section defines persistent storage volumes for your application. Each volume is a key-value pair where the key is the volume name and the value contains the volume configuration.

Volume Configuration Fields

  • target (string, required) - Path inside the container where volume is mounted
  • url (string, optional) - URL path for web access to volume
  • environment_variable (string, optional) - Environment variable name for volume path
  • source (string, optional) - Source path on host (for bind mounts)

Example Volumes

volumes:
  media:
    target: /uploads/
    url: /media/
    environment_variable: MEDIA
  data:
    target: /app/data/
    environment_variable: DATA_PATH
  logs:
    target: /app/logs/
    source: /var/log/myapp

Cron Jobs

The cronjobs section defines scheduled tasks that run at specified intervals. Each cron job is a key-value pair where the key is the job name and the value contains the job configuration.

Cron Job Configuration Fields

  • schedule (string, required) - Cron schedule expression
  • command (string, required) - Command to execute

Example Cron Jobs

cronjobs:
  send_emails:
    schedule: "0 * * * *"  # Every hour
    command: python manage.py send_emails
  fetch_rss:
    schedule: "0 */6 * * *"  # Every 6 hours
    command: python manage.py fetch_rss
  daily_backup:
    schedule: "0 2 * * *"  # Daily at 2 AM
    command: python manage.py backup

Using YML configuration

File Location

Place the appliku.yml file in the root directory of your application repository.

Validation

The configuration file is automatically validated when: - You push code to your repository - You manually trigger a deployment - You import the configuration through the Appliku dashboard

Configuration Updates

When you update the appliku.yml file and push to your repository, Appliku will: 1. Validate the new configuration 2. Apply the changes to your application 3. Deploy the updated configuration

Environment-Specific Configuration

You can use environment variables in your configuration to handle different environments:

build_settings:
  build_image: python-3.11
  environment_variables:
    - name: DEBUG
      value: "false"
    - name: DATABASE_URL
      from_database:
        name: db
        property: connection_url

Exporting YML configuration

You can export the current application configuration as a appliku.yml file from the Appliku dashboard.

To do that go to the application settings page, "YAML Config" and click "Export YAML Config".

You can then copy the contents to the clipboard or download it as an appliku.yml file and save it to the application repository.

This will generate a YAML file containing all current settings for your application, including:

  • Build settings
  • Service configurations
  • Database configurations
  • Volume configurations
  • Cron job configurations
  • Environment variables

This exported configuration can be used as a starting point for new applications or as a backup of your current configuration.

Complete Example

Here's a complete example of an appliku.yml configuration file:

build_settings:
  build_image: python-3.11-node-20.10
  build_command: npm run build
  dockerfile: Dockerfile
  dockerfile_path: /app
  container_port: 8000
  skip_release_command: false
  expose_web_port: false
  is_static_site: false
  output_directory: build/html
  environment_variables:
    - name: DEBUG
      value: "false"
    - name: DATABASE_URL
      from_database:
        name: db
        property: connection_url
    - name: REDIS_URL
      from_database:
        name: redis
        property: connection_url
    - name: SECRET_KEY
      source: manual

services:
  web:
    command: gunicorn project.wsgi --log-file -
    scale: 2
    mode: replicated
    placement_constraints: |
      node.role == manager
    resources_limits_memory: 512M
    resources_limits_cpus: "0.5"
    resources_reservations_memory: 256M
    resources_reservations_cpus: "0.25"

  worker:
    command: celery -A project worker -l info
    scale: 1
    mode: replicated
    placement_constraints: |
      node.role == worker
    resources_limits_memory: 256M
    resources_limits_cpus: "0.25"

  release:
    command: python manage.py migrate

databases:
  db:
    type: postgresql_17
  redis:
    type: redis_7

volumes:
  media:
    target: /app/media/
    url: /media/
    environment_variable: MEDIA_ROOT
  static:
    target: /app/static/
    url: /static/
    environment_variable: STATIC_ROOT

cronjobs:
  cleanup_old_files:
    schedule: "0 3 * * *"
    command: python manage.py cleanup_old_files
  send_daily_report:
    schedule: "0 9 * * 1"
    command: python manage.py send_daily_report