version: '2.4'

services:
  onegeo-suite: &onegeo-suite
      image: neogeo/onegeo-suite:testing
      build: .
      volumes:
        - onegeo:/home/apprunner/onegeo_app/media
      env_file:
        - env
      ports:
        - 5000:80
      restart: always
      mem_limit: 1g
      mem_reservation: 512m
      cpu_count: 1

  onegeo-suite-worker:
      <<: *onegeo-suite
      command: src/docker/start-celery.sh
      ports: []

  onegeo-suite-beat:
      <<: *onegeo-suite
      command: src/docker/start-celery-beat.sh
      ports: []

  redis:
    image: redis

  postgres:
    image: postgis/postgis:12-3.1
    environment:
      POSTGRES_PASSWORD: onegeo
      POSTGRES_USER: onegeo
      POSTGRES_DB: onegeo
    volumes:
      - postgres:/var/lib/postgresql/data

volumes:
  onegeo:
  postgres:
