version: "3.8"

services:
  ca:
    volumes:
      - ./data:/data
      - step:/root/.step

  mariadb_init:
    depends_on:
      mariadb:
        condition: service_healthy

  git:
    volumes:
      - git_data:/aurweb/aur.git
      - ./data:/aurweb/data

  smartgit:
    volumes:
      - git_data:/aurweb/aur.git
      - ./data:/data
      - smartgit_run:/var/run/smartgit
    depends_on:
      mariadb:
        condition: service_healthy

  php-fpm:
    volumes:
      - ./data:/data
      - ./aurweb:/aurweb/aurweb
      - ./migrations:/aurweb/migrations
      - ./test:/aurweb/test
      - ./web/html:/aurweb/web/html
      - ./web/template:/aurweb/web/template
      - ./web/lib:/aurweb/web/lib
      - ./templates:/aurweb/templates

  fastapi:
    volumes:
      - ./data:/data
      - ./aurweb:/aurweb/aurweb
      - ./migrations:/aurweb/migrations
      - ./test:/aurweb/test
      - ./web/html:/aurweb/web/html
      - ./web/template:/aurweb/web/template
      - ./web/lib:/aurweb/web/lib
      - ./templates:/aurweb/templates

  nginx:
    volumes:
      - ./data:/data
      - archives:/var/lib/aurweb/archives
      - smartgit_run:/var/run/smartgit
