networks:
  1panel-network:
    external: true
services:
  mastodon:
    command: bundle exec puma -C config/puma.rb
    container_name: mastodon
    env_file:
    - ./envs/global.env
    - ./envs/mastodon.env
    - .env
    environment:
    - TZ=Asia/Shanghai
    image: ghcr.io/mastodon/mastodon:v4.3.6
    labels:
      createdBy: Apps
    networks:
    - 1panel-network
    ports:
    - ${PANEL_APP_PORT_HTTP}:3000
    restart: always
    volumes:
    - ${MASTODON_ROOT_PATH}/system:/mastodon/public/system
  sidekiq-mastodon:
    command: bundle exec sidekiq
    container_name: sidekiq-mastodon
    env_file:
    - ./envs/global.env
    - ./envs/mastodon.env
    - .env
    environment:
    - TZ=Asia/Shanghai
    image: ghcr.io/mastodon/mastodon:v4.3.6
    networks:
    - 1panel-network
    restart: always
    volumes:
    - ${MASTODON_ROOT_PATH}/system:/mastodon/public/system
  streaming-mastodon:
    command: node ./streaming/index.js
    container_name: streaming-mastodon
    env_file:
    - ./envs/global.env
    - ./envs/mastodon.env
    - .env
    environment:
    - TZ=Asia/Shanghai
    image: ghcr.io/mastodon/mastodon-streaming:v4.3.6
    networks:
    - 1panel-network
    ports:
    - ${PANEL_APP_PORT_STREAM}:4000
    restart: always
