version: "3.2"
networks:
  admin_default:
    external: true
volumes:
  app: {}
  data: {}
  postgres: {}
services:
  nginx:
    image: akilli/nginx
    container_name: nginx
    restart: unless-stopped
    labels:
      traefik.enable: "true"
      traefik.port: "80"
      traefik.docker.network: "admin_default"
    networks:
      - admin_default
      - default
    depends_on:
      - php
    volumes:
      - source: app
        target: /app
        type: volume
        read_only: true
  php:
    image: akilli/qnd
    container_name: php
    restart: unless-stopped
    depends_on:
      - postgres
    volumes:
      - source: app
        target: /app
        type: volume
      - source: data
        target: /data
        type: volume
        volume:
          nocopy: true
  postgres:
    image: akilli/qnd-data
    container_name: postgres
    restart: unless-stopped
    volumes:
      - source: data
        target: /data
        type: volume
      - source: postgres
        target: /var/lib/postgresql
        type: volume

version: "3.2"
networks:
  rp_default:
    external: true
volumes:
  app: {}
  data: {}
  postgres: {}
services:
  nginx:
    image: akilli/nginx
    container_name: nginx
    restart: unless-stopped
    labels:
      traefik.enable: "true"
      traefik.port: "80"
      traefik.docker.network: "rp_default"
    networks:
      - default
      - rp
    depends_on:
      - php
    volumes:
      - source: app
        target: /app
        type: volume
        read_only: true
  php:
    image: akilli/qnd
    container_name: php
    restart: unless-stopped
    depends_on:
      - postgres
    volumes:
      - source: app
        target: /app
        type: volume
      - source: data
        target: /data
        type: volume
        volume:
          nocopy: true
  postgres:
    image: akilli/qnd-data
    container_name: postgres
    restart: unless-stopped
    volumes:
      - source: data
        target: /data
        type: volume
      - source: postgres
        target: /var/lib/postgresql
        type: volume

Split admin into cd + rp
Split admin into cd + rp
