services:
  backend:
    container_name: infisical-backend
    restart: unless-stopped
    depends_on:
      redis:
        condition: service_started
    image: infisical/infisical:latest-postgres
    pull_policy: always
    env_file: .env
    ports:
      - 8080:8080
    environment:
      - NODE_ENV=production
    networks:
      - infisical

  redis:
    image: redis
    container_name: infisical-dev-redis
    env_file: .env
    restart: always
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    ports:
      - 6379:6379
    networks:
      - infisical
    volumes:
      - redis_data:/data
volumes:
  redis_data:
    driver: local

networks:
  infisical:
