# yingqing / AirShelf — 1Panel + Docker Compose # MySQL/Redis 由 1Panel 安装,容器名:yingqing-mysql、yingqing-redis # 应用加入 1panel-network,反代到本机 :8080 services: airshelf-core-api: build: context: ./core/backend image: airshelf-core-api:local container_name: airshelf-core-api restart: unless-stopped env_file: - ./core/backend/.env environment: DJANGO_SETTINGS_MODULE: airshelf.settings.production # entrypoint 在 gunicorn 时跑 migrate + collectstatic command: ["gunicorn", "airshelf.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "3", "--threads", "4", "--timeout", "300"] networks: - 1panel-network expose: - "8000" airshelf-core-worker: image: airshelf-core-api:local container_name: airshelf-core-worker restart: unless-stopped env_file: - ./core/backend/.env environment: DJANGO_SETTINGS_MODULE: airshelf.settings.production command: ["celery", "-A", "airshelf.celery:app", "worker", "-l", "info", "-Q", "celery", "--concurrency", "4"] depends_on: - airshelf-core-api networks: - 1panel-network airshelf-core-worker-quick: image: airshelf-core-api:local container_name: airshelf-core-worker-quick restart: unless-stopped env_file: - ./core/backend/.env environment: DJANGO_SETTINGS_MODULE: airshelf.settings.production command: ["celery", "-A", "airshelf.celery:app", "worker", "-l", "info", "-Q", "airshelf.quick", "--concurrency", "4"] depends_on: - airshelf-core-api networks: - 1panel-network yingqing-web: build: context: ./core/frontend image: airshelf-yingqing-web:local container_name: yingqing-web restart: unless-stopped depends_on: - airshelf-core-api ports: - "8080:80" networks: - 1panel-network networks: 1panel-network: external: true