#####################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#####################################################################

version: "2.4"

services:
  db:
    image: postgres:13
    mem_limit: 300M
    memswap_limit: 300M
    cpu_shares: 200
    restart: "no"
    volumes:
      - ./postgres-initdb.d:/docker-entrypoint-initdb.d
    env_file:
      - postgres.env
      - ofbiz-postgres.env

  ofbiz:
    image: ofbiz-docker
    mem_limit: 1600M
    memswap_limit: 1600M
    cpu_shares: 200
    ports:
      - 8443:8443
    volumes:
      - ./after-config-applied.d:/docker-entrypoint-hooks/after-config-applied.d
    env_file:
      - ofbiz-postgres.env
    environment:
      OFBIZ_DATA_LOAD: demo
      OFBIZ_HOST: example.internal
      OFBIZ_CONTENT_URL_PREFIX: https://example.internal:8443
