networks:
  1panel-network:
    external: true

services:
  mediacms-migrations:
    image: mediacms/mediacms:6.7.1
    container_name: migrations-${CONTAINER_NAME}
    volumes:
      - ${MEDIACMS_ROOT_PATH}:/home/mediacms.io/mediacms
    command:
      - ./deploy/docker/prestart.sh
    restart: on-failure
    environment:
      - ENABLE_UWSGI=no
      - ENABLE_NGINX=no
      - ENABLE_CELERY_SHORT=no
      - ENABLE_CELERY_LONG=no
      - ENABLE_CELERY_BEAT=no
      - ADMIN_USER=${ADMIN_USER}
      - ADMIN_EMAIL=${ADMIN_EMAIL}
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
  mediacms:
    image: mediacms/mediacms:6.7.1
    container_name: ${CONTAINER_NAME}
    depends_on:
      - mediacms-migrations
    labels:
      createdBy: "Apps"
    networks:
      - 1panel-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:80
    volumes:
      - ${MEDIACMS_ROOT_PATH}:/home/mediacms.io/mediacms
    restart: always
    environment:
      - ENABLE_CELERY_BEAT=no
      - ENABLE_CELERY_SHORT=no
      - ENABLE_CELERY_LONG=no
      - ENABLE_MIGRATIONS=no
  mediacms-celery-beat:
    image: mediacms/mediacms:6.7.1
    container_name: celery-beat-${CONTAINER_NAME}
    volumes:
      - ${MEDIACMS_ROOT_PATH}:/home/mediacms.io/mediacms
    environment:
      - ENABLE_UWSGI=no
      - ENABLE_NGINX=no
      - ENABLE_CELERY_SHORT=no
      - ENABLE_CELERY_LONG=no
      - ENABLE_MIGRATIONS=no
  mediacms-celery-worker:
    image: mediacms/mediacms:6.7.1
    container_name: celery-worker-${CONTAINER_NAME}
    depends_on:
      - mediacms-migrations
    volumes:
      - ${MEDIACMS_ROOT_PATH}:/home/mediacms.io/mediacms
    environment:
      - ENABLE_UWSGI=no
      - ENABLE_NGINX=no
      - ENABLE_CELERY_BEAT=no
      - ENABLE_MIGRATIONS=no
