
# -------------------------------------------------------------------------
# 🚀 Created and distributed by The AltStack
# 🌍 https://thealtstack.com
# -------------------------------------------------------------------------

version: '3.8'

services:
  activepieces:
    image: activepieces/activepieces:latest
    container_name: activepieces
    restart: unless-stopped
    depends_on:
      - db
      - redis
    ports:
      - "8080:80"
    environment:
      - AP_FRONTEND_URL=http://localhost:8080
      - AP_POSTGRES_DATABASE=activepieces
      - AP_POSTGRES_HOST=db
      - AP_POSTGRES_PORT=5432
      - AP_POSTGRES_USERNAME=activepieces
      - AP_POSTGRES_PASSWORD=activepieces
      - AP_REDIS_HOST=redis
      - AP_REDIS_PORT=6379

  db:
    image: postgres:14-alpine
    container_name: activepieces-db
    restart: unless-stopped
    environment:
      - POSTGRES_USER=activepieces
      - POSTGRES_PASSWORD=activepieces
      - POSTGRES_DB=activepieces
    volumes:
      - activepieces_db_data:/var/lib/postgresql/data

  redis:
    image: redis:alpine
    container_name: activepieces-redis
    restart: unless-stopped

volumes:
  activepieces_db_data:
