version: "3.9" services: api: image: ${LANQIN_API_IMAGE:-lanqin-email-api:local} build: context: .. dockerfile: deploy/api.Dockerfile env_file: .env volumes: - lanqin-data:/data - maildata:/var/mail/vhosts:ro depends_on: - dovecot - postfix restart: unless-stopped web: image: ${LANQIN_WEB_IMAGE:-lanqin-email-web:local} build: context: .. dockerfile: deploy/web.Dockerfile restart: unless-stopped nginx: image: nginx:1.27-alpine volumes: - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro ports: - "80:80" - "443:443" depends_on: - api - web restart: unless-stopped postfix: image: ${LANQIN_POSTFIX_IMAGE:-lanqin-email-postfix:local} build: context: ./postfix env_file: .env volumes: - lanqin-data:/data - maildata:/var/mail/vhosts ports: - "25:25" - "587:587" depends_on: - dovecot - opendkim restart: unless-stopped dovecot: image: ${LANQIN_DOVECOT_IMAGE:-lanqin-email-dovecot:local} build: context: ./dovecot env_file: .env volumes: - lanqin-data:/data - maildata:/var/mail/vhosts ports: - "993:993" restart: unless-stopped opendkim: image: ${LANQIN_OPENDKIM_IMAGE:-lanqin-email-opendkim:local} build: context: ./opendkim env_file: .env volumes: - lanqin-data:/data:ro - dkim-keys:/etc/opendkim/keys restart: unless-stopped volumes: lanqin-data: maildata: dkim-keys: