postgresql.yml.ftl 935 字节
Newer Older
sq3536's avatar
sq3536 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<#assign dbUserName="root">
<#assign bflag=false>
<#if sys.getAllPSDevSlnMSDepAPIs()??>
  <#list sys.getAllPSDevSlnMSDepAPIs() as depSysApi>
    <#if depSysApi.getPSDBDevInst()??>
      <#assign sysApiDBInst=depSysApi.getPSDBDevInst()>
      <#assign dbUserName=sysApiDBInst.getUserName()>
      <#if (sysApiDBInst.getDBType()=='POSTGRESQL')>
        <#assign bflag=true>
      </#if>
      <#break>
    </#if>
  </#list>
</#if>
<#if bflag==true>
version: "3.2"
services:
    ${sys.name}-postgresql:
    container_name: postgres
    image: postgres
    restart: always
    environment:
      POSTGRES_DB: ${dbUserName}
      POSTGRES_USER: ${dbUserName}
      POSTGRES_PASSWORD: root
    ports:
      - 5432:5432
    volumes:
      - $PWD/../../../../volumes/postgresql/:/var/lib/postgresql/data
    networks:
      - agent_network
networks:
  agent_network:
    attachable: true
</#if>