version: "3.9" services: web: build: ./app image: registry.cybercode.pro/cybercode/mfssogr:latest command: > sh -c " python manage.py migrate --noinput && gunicorn -c mfssogr/gunicorn.conf.py " ports: - "8000:8000" env_file: - .env depends_on: postgres: condition: service_healthy redis: condition: service_healthy volumes: - ./app/static:/home/app/static/ - ./app/log:/home/app/log/ restart: always celery: image: registry.cybercode.pro/cybercode/mfssogr:latest command: celery -A mfssogr worker --loglevel=INFO env_file: - .env volumes: - ./app/log:/home/app/log - ./app/media:/home/app/media depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: always celery-beat: image: registry.cybercode.pro/cybercode/mfssogr:latest command: celery -A mfssogr beat -l info env_file: - .env depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: always postgres: hostname: postgres image: postgis/postgis:13-3.5 volumes: - postgres_data:/var/lib/postgresql/data/ env_file: - .env ports: - "5432:5432" healthcheck: test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ] interval: 10s timeout: 60s retries: 3 start_period: 10s restart: always redis: hostname: redis image: redis volumes: - redis_data:/data ports: - "6379:6379" healthcheck: test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] interval: 1s timeout: 3s retries: 5 restart: always volumes: postgres_data: redis_data: